-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implement install subcommand #393
Conversation
Codecov ReportAttention:
Additional details and impacted files
☔ View full report in Codecov by Sentry. |
Use |
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.
LGTM, one small opinion
@@ -150,7 +150,7 @@ fn methods(builder: &mut MethodsBuilder) { | |||
remove_impl::remove(path)?; | |||
Ok(NoneType{}) | |||
} | |||
fn rename(this: FileLibrary, old: String, new: String) -> anyhow::Result<NoneType> { | |||
fn moveto(this: FileLibrary, old: String, new: String) -> anyhow::Result<NoneType> { |
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.
Imo move
looks/sounds better, but up to you.
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.
Ope - tried to make this change.
We made it moveto since move is a restricted word in rust.
So can't have functions named move. 💀
@@ -221,7 +221,7 @@ mod tests { | |||
a.globals(globals); | |||
a.all_true( | |||
r#" | |||
dir(file) == ["append", "compress", "copy", "download", "exists", "hash", "is_dir", "is_file", "list", "mkdir", "read", "remove", "rename", "replace", "replace_all", "template", "timestomp", "write"] | |||
dir(file) == ["append", "compress", "copy", "download", "exists", "hash", "is_dir", "is_file", "list", "mkdir", "moveto", "read", "remove", "replace", "replace_all", "template", "timestomp", "write"] |
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.
move/moveto
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR allows you to use the
imix install
subcommand.The install subcommand executes embedded tomes similar to golem.
It will loop through all embedded files looking for
main.eld
Each
main.eld
will execute in a new thread. This is done to allow imix to install redundantly or install additional (non dependent) tools.The install subcommand makes allows some variables to be passed form the user into the tomes through the
-c
flag.When specified
input_params['custom_config']
is set to the file path of the config specified Eg../imix install -c /tmp/imix-config.json
will result ininput_params['custom_config'] = "/tmp/imix-config.json
Tomes can parse this with the following:
A default install option is provided in this PR (sans windows). This option will install the imix agent as a service.
The install subcommand help
An example service config
Which issue(s) this PR fixes:
Fixes #374