Skip to content

Commit 59db679

Browse files
Copilotandrejusk
andcommitted
Replace bash-specific &>/dev/null with POSIX-compatible >/dev/null 2>&1
Co-authored-by: andrejusk <[email protected]>
1 parent 83abfb6 commit 59db679

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

files/home/.profile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ if [ -f "$node_alias" ]; then
5555
fi
5656

5757
# Check Node.js version if node is available
58-
if command -v node &>/dev/null; then
58+
if command -v node >/dev/null 2>&1; then
5959
current_node_version=$(node --version 2>/dev/null)
6060
# VERSION from alias file may or may not have 'v' prefix
6161
expected_version="$VERSION"
@@ -70,7 +70,7 @@ if [ -f "$node_alias" ]; then
7070
fi
7171
else
7272
# Only warn about missing node if nvm was successfully loaded
73-
if command -v nvm &>/dev/null && ! command -v node &>/dev/null; then
73+
if command -v nvm >/dev/null 2>&1 && ! command -v node >/dev/null 2>&1; then
7474
_dots_warn "Node.js not configured: alias file not found at $node_alias"
7575
fi
7676
fi
@@ -83,7 +83,7 @@ if [[ ":$PATH:" != *":$PYENV_ROOT/bin:"* ]]; then
8383
export PATH="$PYENV_ROOT/bin:$PATH"
8484
fi
8585
_dots_load_pyenv() {
86-
if command -v pyenv &>/dev/null; then
86+
if command -v pyenv >/dev/null 2>&1; then
8787
eval "$(pyenv init --path)" || _dots_warn "Failed to initialize pyenv"
8888
else
8989
_dots_warn "pyenv not found in PATH"
@@ -93,14 +93,14 @@ _dots_load_pyenv
9393

9494
# Check Python version if pyenv is available
9595
expected_python_version="3.13.7"
96-
if command -v pyenv &>/dev/null; then
97-
if command -v python &>/dev/null; then
96+
if command -v pyenv >/dev/null 2>&1; then
97+
if command -v python >/dev/null 2>&1; then
9898
current_python_version=$(python --version 2>&1 | awk '{print $2}')
9999
if [ -n "$current_python_version" ] && [ "$current_python_version" != "$expected_python_version" ]; then
100100
_dots_warn "Python version mismatch: current=$current_python_version, expected=$expected_python_version"
101101
fi
102102
unset current_python_version
103-
elif command -v python3 &>/dev/null; then
103+
elif command -v python3 >/dev/null 2>&1; then
104104
current_python_version=$(python3 --version 2>&1 | awk '{print $2}')
105105
if [ -n "$current_python_version" ] && [ "$current_python_version" != "$expected_python_version" ]; then
106106
_dots_warn "Python version mismatch: current=$current_python_version, expected=$expected_python_version"

0 commit comments

Comments
 (0)