Skip to content

Commit

Permalink
Add vscode.vm
Browse files Browse the repository at this point in the history
Closes #887.
  • Loading branch information
vm-packages committed Feb 2, 2024
1 parent fb84391 commit e310a25
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/vscode.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$ErrorActionPreference = 'Stop'
Import-Module vm.common -Force -DisableNameChecking

try {
$toolName = 'VSCode'
$category = 'Text Editors'
$shimPath = 'Unable to locate one'

$shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category
$shortcut = Join-Path $shortcutDir "$toolName.lnk"
$executablePath = Join-Path ${Env:ChocolateyInstall} $shimPath -Resolve
VM-Install-Shortcut -toolName $toolName -category $category -executablePath $executablePath -runAsAdmin
VM-Assert-Path $shortcut
} catch {
VM-Write-Log-Exception $_
}
7 changes: 7 additions & 0 deletions packages/vscode.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$ErrorActionPreference = 'Continue'
Import-Module vm.common -Force -DisableNameChecking

$toolName = 'VSCode'
$category = 'Text Editors'

VM-Remove-Tool-Shortcut $toolName $category
13 changes: 13 additions & 0 deletions packages/vscode.vm/vscode.vm.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>vscode.vm</id>
<version>1.85.2</version>
<authors>Microsoft</authors>
<description>VSCode is a modern, open-source code editor.</description>
<dependencies>
<dependency id="common.vm" />
<dependency id="vscode.install" version="[1.85.2]" />
</dependencies>
</metadata>
</package>

0 comments on commit e310a25

Please sign in to comment.