Skip to content

Commit

Permalink
vscode: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunrisepeak committed Jan 20, 2025
1 parent bac71c1 commit 549c178
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pkgs/v/vscode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@ function install()
end

function config()
local xvm_cmd_template1 = "xvm add code %s --path %s/bin --alias code.cmd"
local xvm_cmd_template2 = "xvm add vscode %s --path %s/bin --alias code.cmd"
os.exec(string.format(xvm_cmd_template1, pkginfo.version, pkginfo.install_dir))
os.exec(string.format(xvm_cmd_template2, pkginfo.version, pkginfo.install_dir))
local xvm_cmd_template1 = "xvm add code %s --path %s/bin --alias %s"
local xvm_cmd_template2 = "xvm add vscode %s --path %s/bin --alias %s"
local code_alias = "code"

-- config desktop entry
if os.host() == "windows" then
code_alias = "code.cmd"
-- create desktop shortcut
local lnk_filename = "Visual Studio Code - [" .. pkginfo.version .. "] - XIM"
create_windows_shortcut(
Expand All @@ -126,6 +127,9 @@ function config()
end
end

os.exec(string.format(xvm_cmd_template1, pkginfo.version, pkginfo.install_dir, code_alias))
os.exec(string.format(xvm_cmd_template2, pkginfo.version, pkginfo.install_dir, code_alias))

return true
end

Expand Down

0 comments on commit 549c178

Please sign in to comment.