Fix PowerShell auto-close when native-messenger installation fails

This commit is contained in:
Babil Golam Sarwar 2018-07-11 12:19:04 +10:00
parent be245d5dfa
commit 02c76e0f00
No known key found for this signature in database
GPG key ID: 8EA67D99F433E92D
4 changed files with 7 additions and 9 deletions

View file

@ -46,7 +46,7 @@ if [ "$(isWindowsMinGW)" = "True" ]; then
-NoProfile \
-InputFormat None \
-ExecutionPolicy Bypass \
native/win_install.ps1 -DebugDirBase native
native/install.ps1 -DebugDirBase native
else
native/install.sh local
fi

View file

@ -295,10 +295,8 @@ const DEFAULTS = o({
browser: "firefox",
nativeinstallcmd:
"curl -fsSl https://raw.githubusercontent.com/cmcaine/tridactyl/master/native/install.sh | bash",
win_powershell_nativeinstallcmd:
"Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/cmcaine/tridactyl/master/native/win_install.ps1'))",
win_cmdexe_nativeinstallcmd:
'@"%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" -NoProfile -InputFormat None -Command "iex ((New-Object System.Net.WebClient).DownloadString(\'https://raw.githubusercontent.com/cmcaine/tridactyl/master/native/win_install.ps1\'))"',
win_nativeinstallcmd:
"powershell -NoProfile -InputFormat None -Command \"Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/cmcaine/tridactyl/master/native/install.ps1'))\"",
profiledir: "auto",
// Container settings

View file

@ -384,9 +384,9 @@ export async function native() {
//#background
export async function installnative() {
if ((await browser.runtime.getPlatformInfo()).os === "win") {
const installstr = await config.get("win_powershell_nativeinstallcmd")
const installstr = await config.get("win_nativeinstallcmd")
await yank(installstr)
fillcmdline("# Installation command copied to clipboard. Please paste and run it in Windows Powershell to install the native messenger.")
fillcmdline("# Installation command copied to clipboard. Please paste and run it from cmd.exe, PowerShell, or MinTTY to install the native messenger.")
} else {
const installstr = await config.get("nativeinstallcmd")
await yank(installstr)
@ -435,7 +435,7 @@ export async function updatenative(interactive = true) {
return
}
if ((await browser.runtime.getPlatformInfo()).os === "win") {
await Native.run(await config.get("win_cmdexe_nativeinstallcmd"))
await Native.run(await config.get("win_nativeinstallcmd"))
} else {
await Native.run(await config.get("nativeinstallcmd"))
}
@ -948,7 +948,7 @@ export function home(all: "false" | "true" = "false") {
/** Show this page.
`:help something` jumps to the entry for something. Something can be an excmd, an alias for an excmd or a binding.
`:help something` jumps to the entry for something. Something can be an excmd, an alias for an excmd or a binding.
The "nmaps" list is a list of all the bindings for the command you're seeing and the "exaliases" list lists all its aliases.