Skip to content

Commit

Permalink
Remove platform specific install warning
Browse files Browse the repository at this point in the history
  • Loading branch information
evaera committed Jul 2, 2022
1 parent b783251 commit 1ddb528
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 36 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-rojo",
"displayName": "Rojo - Roblox Studio Sync",
"description": "Rojo for VS Code",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"repository": "https://github.com/rojo-rbx/vscode-rojo",
"publisher": "evaera",
"engines": {
Expand Down
42 changes: 9 additions & 33 deletions src/installRojo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,40 +168,16 @@ export async function installRojo(folder: string) {

await exec(`${tempPath} self-install`)

if (os.platform() === "win32") {
vscode.window.showInformationMessage(
"Successfully installed Aftman on your system. " +
"It has been added to your system PATH, and is usable from the command line if needed. "
)
} else {
vscode.window
.showWarningMessage(
"[User Action Required] Aftman was installed to `~/.aftman/bin`. " +
"You MUST add this folder to your system path, and restart VS Code, before continuing. " +
'Click the button below and read the "Aftman bin on Non-Windows platforms" section' +
" of the README if you need help.",
"Open README"
)
.then((response) => {
if (!response) {
return
}

vscode.env.openExternal(
vscode.Uri.from({
scheme: vscode.env.uriScheme,
path: "extension/evaera.vscode-rojo",
})
)
})
return
}
}
vscode.window.showInformationMessage(
"Successfully installed Aftman on your system. " +
"It has been added to your system PATH, and is usable from the command line if needed. "
)

if ("PATH" in process.env) {
const envPath = process.env.PATH!.split(path.delimiter)
envPath.push(path.join(os.homedir(), ".aftman", "bin"))
process.env.PATH = envPath.join(path.delimiter)
if ("PATH" in process.env) {
const envPath = process.env.PATH!.split(path.delimiter)
envPath.push(path.join(os.homedir(), ".aftman", "bin"))
process.env.PATH = envPath.join(path.delimiter)
}
}

await exec("aftman trust rojo-rbx/rojo", {
Expand Down

0 comments on commit 1ddb528

Please sign in to comment.