From 615f8f4a4b93b6edb08c03c63297083eb41981a2 Mon Sep 17 00:00:00 2001 From: Patrick Kahl Date: Fri, 6 Jun 2025 20:27:20 +0200 Subject: [PATCH] Fix spinner utilities and temp dir --- bin/dot-cli/src/utils.mjs | 11 ++++------- scripts/functions.sh | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) 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"