Merge pull request #1 from FloopCZ/feature/batch-mode
Make the batch mode work even in Docker environment
This commit is contained in:
commit
4d5fa086bb
@ -34,7 +34,7 @@ check_optional_args() {
|
||||
case "$arg" in
|
||||
--batch)
|
||||
LAUNCH_ZSH_AFTER=0
|
||||
printf "${BLUE}--batch:${NORMAL} zsh will not be started after installation\n"
|
||||
printf "%s\n" "${BLUE}--batch:${NORMAL} zsh will not be started after installation"
|
||||
;;
|
||||
*)
|
||||
printf "${YELLOW}Unrecognized argument: ${BLUE}${arg}${NORMAL}\n"
|
||||
@ -101,7 +101,7 @@ main() {
|
||||
mv -f ~/.zshrc-omztemp ~/.zshrc
|
||||
|
||||
# If this user's login shell is not already "zsh", attempt to switch.
|
||||
TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)')
|
||||
TEST_CURRENT_SHELL=$(expr "${SHELL:=/bin/false}" : '.*/\(.*\)')
|
||||
if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then
|
||||
# If this platform provides a "chsh" command (not Cygwin), do it, man!
|
||||
if hash chsh >/dev/null 2>&1; then
|
||||
|
Loading…
Reference in New Issue
Block a user