Skip to content

Commit 9fa9ff2

Browse files
committed
hardcoding whisk directory
1 parent fdf1cf1 commit 9fa9ff2

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

install.sh

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,28 +169,27 @@ main() {
169169

170170
# Create launcher script
171171
mkdir -p "$WHISK_DIR/bin"
172-
cat > "$WHISK_DIR/bin/whisk" << 'EOF'
172+
cat > "$WHISK_DIR/bin/whisk" << EOF
173173
#!/bin/bash
174174
# Whisk launcher script
175175
176-
# Get the directory where this script is located
177-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
178-
# Get the whisk installation directory (parent of bin/)
179-
WHISK_DIR="$(dirname "$SCRIPT_DIR")"
176+
# Hardcode the whisk directory path to avoid path resolution issues
177+
WHISK_DIR="$WHISK_DIR"
180178
# Path to the virtual environment Python
181-
VENV_PYTHON="$WHISK_DIR/venv/bin/python"
179+
VENV_PYTHON="\$WHISK_DIR/venv/bin/python"
182180
183181
# Check if virtual environment exists
184-
if [[ ! -f "$VENV_PYTHON" ]]; then
185-
echo "Error: Virtual environment not found at $VENV_PYTHON"
182+
if [[ ! -f "\$VENV_PYTHON" ]]; then
183+
echo "Error: Virtual environment not found at \$VENV_PYTHON"
184+
echo "WHISK_DIR is set to: \$WHISK_DIR"
186185
echo "Try reinstalling whisk with:"
187186
echo " curl -sSL https://raw.githubusercontent.com/aarons22/whisk/main/install.sh | bash"
188187
exit 1
189188
fi
190189
191190
# Change to whisk directory and run
192-
cd "$WHISK_DIR"
193-
exec "$VENV_PYTHON" -m whisk "$@"
191+
cd "\$WHISK_DIR"
192+
exec "\$VENV_PYTHON" -m whisk "\$@"
194193
EOF
195194
chmod +x "$WHISK_DIR/bin/whisk"
196195

0 commit comments

Comments
 (0)