@@ -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
7171else
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
7676fi
@@ -83,7 +83,7 @@ if [[ ":$PATH:" != *":$PYENV_ROOT/bin:"* ]]; then
8383 export PATH=" $PYENV_ROOT /bin:$PATH "
8484fi
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
9595expected_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