diff --git a/bin/dot-cli/src/utils.mjs b/bin/dot-cli/src/utils.mjs index cceff536..a81a69a0 100644 --- a/bin/dot-cli/src/utils.mjs +++ b/bin/dot-cli/src/utils.mjs @@ -1,4 +1,4 @@ -import { $, os, question } from 'zx'; +import { $, os, question, spinner } from 'zx'; export function isOSX() { return os.platform() === 'darwin'; // 'darwin' is the value returned by os.platform() for macOS @@ -72,10 +72,7 @@ const spin = { }; export const changeCommandWithSpinner = async function(spinnerMsg, cb) { - await spin.start(spinnerMsg) - await cb - .pipe(await spin.stop()) - .pipe(process.stdout) - .pipe(await spin.start(spinnerMsg)) + await spin.start(spinnerMsg); + await cb.pipe(process.stdout); await spin.stop(); -} +}; diff --git a/scripts/functions.sh b/scripts/functions.sh index c5463232..f23af525 100755 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -42,8 +42,8 @@ _createPath() { } _removeSymlinkOrFile() { - file_path="$1" - temp_dir="$HOME/tmp_dir" + file_path="$1" + temp_dir="$HOME/temp_dir" if [ -L "$file_path" ]; then printf "${COLOR_CYAN}Removing symlink $file_path${COLOR_OFF}\n"