diff options
Diffstat (limited to 'planetwars-cli/src/workspace')
-rw-r--r-- | planetwars-cli/src/workspace/bot.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/planetwars-cli/src/workspace/bot.rs b/planetwars-cli/src/workspace/bot.rs index cc88076..a0ecb90 100644 --- a/planetwars-cli/src/workspace/bot.rs +++ b/planetwars-cli/src/workspace/bot.rs @@ -33,9 +33,18 @@ pub struct BotConfig { } impl BotConfig { + // TODO: these commands should not be here pub fn get_run_argv(&self) -> Vec<String> { // TODO: proper error handling shlex::split(&self.run_command) .expect("Failed to parse bot run command. Check for unterminated quotes.") } + + pub fn get_build_argv(&self) -> Option<Vec<String>> { + // TODO: proper error handling + self.build_command.as_ref().map(|cmd| { + shlex::split(cmd) + .expect("Failed to parse bot build command. Check for unterminated quotes.") + }) + } } |