Skip to content

Commit 7615a6c

Browse files
author
JjCyberz
committed
Respect CORTEX_HOME for plugin commands
1 parent 7954d02 commit 7615a6c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/cortex-cli/src/plugin_cmd.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,9 @@ struct PluginInfo {
698698

699699
/// Get the plugins directory.
700700
fn get_plugins_dir() -> PathBuf {
701-
dirs::home_dir()
702-
.map(|h| h.join(".cortex").join("plugins"))
701+
cortex_common::get_cortex_home()
702+
.map(|h| h.join("plugins"))
703+
.or_else(|| dirs::home_dir().map(|h| h.join(".cortex").join("plugins")))
703704
.unwrap_or_else(|| PathBuf::from(".cortex/plugins"))
704705
}
705706

0 commit comments

Comments
 (0)