[BUG] WAIT_COMMAND does not work correctly
WagnerPMC opened this issue · 1 comments
WagnerPMC commented
Hello,
I notice that the executable command is inserted into the arguments of the same executable command:
docker-compose-wait/src/lib.rs
Lines 144 to 151 in 48b2683
In this way, it turns out that the conditional "hello man" command turns into the "hello hello man" command.
To prevent this from happening, we need to remove the first element of the vector from the argv variable, in the same place.
Quick fix:
let mut argv = shell_words::split(&command_string)?;
Ok(Some((
Command {
program: argv.remove(0),
argv,
},
command_string,
)))
If it's a hassle, I can create a PR for a quick fix - just let me know.