-
Notifications
You must be signed in to change notification settings - Fork 154
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
String settings hooks #82
Conversation
theseus/src/api/profile.rs
Outdated
let post_exit_hooks = | ||
&profile.hooks.as_ref().unwrap_or(&settings.hooks).post_exit; | ||
|
||
let post_exit_hooks: Vec<Command> = post_exit_hooks | ||
.iter() | ||
.filter_map(|hook| { | ||
let mut cmd = hook.split(' '); | ||
if let Some(command) = cmd.next() { | ||
let mut command = Command::new(command); | ||
command | ||
.args(&cmd.map(|s| s.to_string()).collect::<Vec<String>>()) | ||
.current_dir(path); | ||
Some(command) | ||
} else { | ||
None | ||
} | ||
}) | ||
.collect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weren't we only doing one command for the post exit hooks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah- it is only one command .but in this part its stored as a vec because previously it went from an iter to a vec (and you can iter over an Option so it worked mostly in place without changing this aspect)
I agree this is misleading though- so fixed.
@@ -74,6 +76,14 @@ impl Settings { | |||
} | |||
} | |||
|
|||
/// Theseus theme | |||
#[derive(Debug, Clone, Copy, Serialize, Deserialize)] | |||
pub enum Theme { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would use a rename all snake case here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good for my part. The env args will be usable and the theme will be a setting. It just looks like Jai has a question around the hooks.
…string-settings-hooks
…string-settings-hooks
Fixes MOD-380 + other miscellaneous things