mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-08-16 14:40:23 +03:00
Ensure script can launch, override path values on logging, add reboot warning
This commit is contained in:
parent
1e658d0735
commit
eda5443bda
@ -129,7 +129,7 @@ export default class SystemPanel {
|
||||
}} />
|
||||
<div className='setting-title'>Add Pulsar to PATH</div>
|
||||
<div className='setting-description'>
|
||||
Add Pulsar to Windows PATH to enable CLI usage.
|
||||
Add Pulsar to Windows PATH to enable CLI usage. (May require a reboot to take effect.)
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
@ -25,7 +25,7 @@ if (-not $remove) {
|
||||
# We want to add Pulsar path values
|
||||
|
||||
# Lets first save a copy of the users current path
|
||||
$env:Path >> prior2addition.txt;
|
||||
$env:Path > prior2addition.txt;
|
||||
|
||||
$originalPathToInstall = $installdir
|
||||
|
||||
@ -67,7 +67,7 @@ if (-not $remove) {
|
||||
# We want to remove Pulsar from the user path
|
||||
|
||||
# Lets first save a copy of the users current path
|
||||
$env:Path >> prior2removal.txt;
|
||||
$env:Path > prior2removal.txt;
|
||||
|
||||
$pulsarPath = $installdir + "\resources";
|
||||
$ppmPath = $installdir + "\resources\app\ppm\bin";
|
||||
|
@ -118,13 +118,13 @@ class PathOption {
|
||||
register(callback) {
|
||||
this.getPulsarPath().then((pulsarPath) => {
|
||||
const child = ChildProcess.execFile(
|
||||
`"${pulsarPath}\\resources\\modifyWindowsPath.ps1"`,
|
||||
['-installdir', `"${pulsarPath}"`, '-remove', '0'],
|
||||
`powershell.exe '${pulsarPath}\\resources\\modifyWindowsPath.ps1'`,
|
||||
['-installdir', `'${pulsarPath}'`, '-remove', '0'],
|
||||
{ shell: "powershell.exe" },
|
||||
(error, stdout, stderr) =>
|
||||
{
|
||||
if (error) {
|
||||
atom.notifications.addError(`Error Running Script: ${error.toString()}`);
|
||||
atom.notifications.addError(`Error Running Script: ${error.toString()}`, { dismissable: true });
|
||||
callback(error);
|
||||
} else {
|
||||
return callback();
|
||||
@ -140,13 +140,13 @@ class PathOption {
|
||||
if (isRegistered) {
|
||||
this.getPulsarPath().then((pulsarPath) => {
|
||||
const child = ChildProcess.execFile(
|
||||
`"${pulsarPath}\\resources\\modifyWindowsPath.ps1"`,
|
||||
`powershell.exe "${pulsarPath}\\resources\\modifyWindowsPath.ps1"`,
|
||||
['-installdir', `"${pulsarPath}"`, '-remove', '1'],
|
||||
{ shell: "powershell.exe" },
|
||||
(error, stdout, stderr) =>
|
||||
{
|
||||
if (error) {
|
||||
atom.notifications.addError(`Error Running Script: ${error.toString()}`);
|
||||
atom.notifications.addError(`Error Running Script: ${error.toString()}`, { dismissable: true });
|
||||
callback(error);
|
||||
} else {
|
||||
return callback();
|
||||
|
Loading…
Reference in New Issue
Block a user