clidesk 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/clidesk.js +14 -2
  2. package/package.json +1 -1
package/bin/clidesk.js CHANGED
@@ -77,12 +77,24 @@ function printDebugInfo() {
77
77
  }
78
78
 
79
79
  function readLatestVersion() {
80
- const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
81
80
  try {
82
- const output = execFileSync(npmCommand, ['view', 'clidesk', 'version', '--silent'], {
81
+ const command = process.platform === 'win32' ? (process.env.ComSpec || 'cmd.exe') : 'npm';
82
+ const commandArgs = process.platform === 'win32'
83
+ ? ['/d', '/s', '/c', 'npm view clidesk version --silent']
84
+ : ['view', 'clidesk', 'version', '--silent'];
85
+ const output = execFileSync(command, commandArgs, {
83
86
  encoding: 'utf8',
84
87
  timeout: 5000,
85
88
  windowsHide: true,
89
+ env: {
90
+ ...process.env,
91
+ npm_config_audit: 'false',
92
+ npm_config_fund: 'false',
93
+ npm_config_loglevel: 'silent',
94
+ npm_config_logs_max: '0',
95
+ npm_config_update_notifier: 'false',
96
+ NO_UPDATE_NOTIFIER: '1',
97
+ },
86
98
  stdio: ['ignore', 'pipe', 'ignore'],
87
99
  });
88
100
  const latest = output.trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clidesk",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CliDesk desktop app launcher — install with npm i -g clidesk",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {