Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert CpiGuard reversion #3756

Merged

Conversation

2501babe
Copy link
Member

to save you the pain of actually reading any of this:

hana@laptop:cli$ git show master
commit e69c7706fb5b1c651b086853d5cb1d688958083a (upstream/master, upstream/HEAD, master)
Author: J <[email protected]>
Date:   Wed Oct 26 05:41:37 2022 +0800

    `spl-token` cli - use default config file (#3738)
    
    * add missing load from CONFIG_FILE default path

diff --git a/token/cli/src/config.rs b/token/cli/src/config.rs
index ef6ee30f..b6cfff1c 100644
--- a/token/cli/src/config.rs
+++ b/token/cli/src/config.rs
@@ -112,6 +112,8 @@ impl<'a> Config<'a> {
                 eprintln!("error: Could not find config file `{}`", config_file);
                 exit(1);
             })
+        } else if let Some(config_file) = &*solana_cli_config::CONFIG_FILE {
+            solana_cli_config::Config::load(config_file).unwrap_or_default()
         } else {
             solana_cli_config::Config::default()
         };
hana@laptop:cli$ git diff 20221013_cpiguard..20221025_cpiguard_antireunvert
diff --git a/token/cli/src/config.rs b/token/cli/src/config.rs
index ef6ee30f..b6cfff1c 100644
--- a/token/cli/src/config.rs
+++ b/token/cli/src/config.rs
@@ -112,6 +112,8 @@ impl<'a> Config<'a> {
                 eprintln!("error: Could not find config file `{}`", config_file);
                 exit(1);
             })
+        } else if let Some(config_file) = &*solana_cli_config::CONFIG_FILE {
+            solana_cli_config::Config::load(config_file).unwrap_or_default()
         } else {
             solana_cli_config::Config::default()
         };

(this is a reversion of a previous reversion of the original CpiGuard commit)
@2501babe 2501babe requested a review from joncinque October 25, 2022 22:28
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

@2501babe 2501babe merged commit 836c9e6 into solana-labs:master Oct 26, 2022
@2501babe 2501babe deleted the 20221025_cpiguard_antireunvert branch October 26, 2022 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants