Skip to content

Commit 2be8fd8

Browse files
committed
Customize success message for targeted updates in installation scripts
- when given target in args, e.g. 'vscode' should change sucess line to: 'Updated successfully! Restart extensions for changes to take effect.'
1 parent 60f04d8 commit 2be8fd8

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

‎install.ps1‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,12 @@ function Install-ToEditor($idx) {
181181
$ErrorActionPreference = "Continue"
182182
& $editorCmd --install-extension $vsixFile.FullName --force *>$null
183183
$ErrorActionPreference = "Stop"
184-
Write-Host "Successfully installed to $editorName!"
184+
185+
if ($targetScheme) {
186+
Write-Host "Updated successfully! Restart extensions for changes to take effect."
187+
} else {
188+
Write-Host "Successfully installed to $editorName!"
189+
}
185190
}
186191

187192
Write-Host ""

‎install.sh‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,12 @@ install_to_editor() {
191191
local editor_name="${AVAILABLE_EDITORS[$idx]}"
192192
local editor_cmd="${EDITOR_CMDS[$idx]}"
193193
$editor_cmd --install-extension "$VSIX_FILE" --force > /dev/null 2>&1
194-
echo "Successfully installed to $editor_name!"
194+
195+
if [ -n "$TARGET_SCHEME" ]; then
196+
echo "Updated successfully! Restart extensions for changes to take effect."
197+
else
198+
echo "Successfully installed to $editor_name!"
199+
fi
195200
}
196201

197202
echo ""

0 commit comments

Comments
 (0)