-
Notifications
You must be signed in to change notification settings - Fork 59
Conversation
IFS=',' read -r -a EXTENSIONLIST <<< "$${EXTENSIONS}" | ||
for extension in "$${EXTENSIONLIST[@]}"; do | ||
if [ -z "$extension" ]; then | ||
continue | ||
fi | ||
printf "🧩 Installing extension $${CODE}$extension$${RESET}...\n" | ||
output=$($VSCODE_SERVER --install-extension "$extension" --force) | ||
if [ $? -ne 0 ]; then | ||
echo "Failed to install extension: $extension: $output" | ||
exit 1 | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given:
EXTENSIONS="foo,bar,baz"
I would suggest the following posix way, so we don't need to rely on bash/arrays.
IFS=',' read -r -a EXTENSIONLIST <<< "$${EXTENSIONS}" | |
for extension in "$${EXTENSIONLIST[@]}"; do | |
if [ -z "$extension" ]; then | |
continue | |
fi | |
printf "🧩 Installing extension $${CODE}$extension$${RESET}...\n" | |
output=$($VSCODE_SERVER --install-extension "$extension" --force) | |
if [ $? -ne 0 ]; then | |
echo "Failed to install extension: $extension: $output" | |
exit 1 | |
fi | |
extension= | |
while [ "$${extension}" != "$${EXTENSIONS}" ]; do | |
extension=$${EXTENSIONS%%,*} | |
EXTENSIONS=$${EXTENSIONS#*,} | |
if [ -z "$${extension}" ]; then | |
continue | |
fi | |
printf "🧩 Installing extension $${CODE}$extension$${RESET}...\n" | |
output=$("$${VSCODE_SERVER}" --install-extension "$${extension}" --force) | |
if [ $? -ne 0 ]; then | |
echo "Failed to install extension: $${extension}: $${output}" | |
exit 1 | |
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is borrowed from code-server
, and I did not try to improve it as code-server is our top downloaded module and well tested. But I agree and we can update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mafredri, any second thoughts? Otherwise I should also update code-server module.
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
@mafredri I removed the tests as our modification to run commands was causing many other tests to fail. |
This pull request adds support for installing extensions in vscode-web.
closes #153
fix testsmerging without tests for now.How to test