Skip to content

Commit

Permalink
[BUILD] Make extension runnable through gradle when os is Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mschaefer88 committed Sep 24, 2020
1 parent 8f46569 commit bcab531
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions vscode/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ tasks.register<Exec>("runExtension") {
group = "VS Code"
description = "Builds and runs the extension"

var cwd = System.getProperty("cwd", "") // argument is -Pcwd=
var execArgs = "code --extensionDevelopmentPath=${projectDir.absolutePath} ${cwd} --inspect-extensions 1234"

var cwd = System.getProperty("cwd", "") // gradle argument is -Pcwd=
var execArgs = "--extensionDevelopmentPath=${projectDir.absolutePath} ${cwd}".trim()
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
executable = "cmd"
setArgs(listOf("/c ${execArgs}"))
setArgs(listOf("/c code ${execArgs}"))
} else {
executable = "sh"
executable = "code"
setArgs(listOf(execArgs))
}

Expand Down

0 comments on commit bcab531

Please sign in to comment.