Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions bin/dot-cli/src/utils.mjs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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();
}
};
4 changes: 2 additions & 2 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down