-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor devcontainer setup and enhance installation script
- Updated the postCreateCommand in .devcontainer/devcontainer.json to remove the SSH permissions command for a cleaner setup process. - Enhanced the install-task.sh script to include debug mode, create the ~/.local/bin directory, and ensure it is added to the PATH, improving usability and installation verification for the Task command.
- Loading branch information
1 parent
25ee8ca
commit 7777516
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
#!/bin/bash | ||
set -x # Enable debug mode to print commands as they execute | ||
|
||
echo "Creating ~/.local/bin directory if it doesn't exist..." | ||
sudo mkdir -p ~/.local/bin | ||
sudo chown vscode:vscode ~/.local/bin | ||
sudo chmod 755 ~/.local/bin | ||
|
||
echo "Installing Task..." | ||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin | ||
|
||
echo "Checking if ~/.local/bin is in PATH..." | ||
if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then | ||
echo "Adding ~/.local/bin to PATH in ~/.zshrc" | ||
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc | ||
export PATH="$HOME/.local/bin:$PATH" | ||
fi | ||
|
||
echo "Verifying task installation..." | ||
which task || echo "Task not found in PATH" | ||
task --version || echo "Task command not working" |