downloads-folder
Advanced tools
Comparing version 1.0.0 to 1.0.1
14
index.js
'use strict'; | ||
const os = require('os'); | ||
const {execSync} = require('child_process'); | ||
const {statSync} = require('fs'); | ||
const execSync = require('child_process').execSync; | ||
const statSync = require('fs').statSync; | ||
@@ -27,4 +27,5 @@ module.exports = () => { | ||
let dir; | ||
try { dir = execSync('xdg-user-dir DOWNLOAD', { stdio: [0, 3, 3] }); } | ||
catch (_) {} | ||
try { | ||
dir = execSync('xdg-user-dir DOWNLOAD', { stdio: [0, 3, 3] }); | ||
} catch (_) {} | ||
if (dir) return dir; | ||
@@ -34,4 +35,5 @@ | ||
const homeDownloads = `${process.env.HOME}/Downloads`; | ||
try { stat = statSync(homeDownloads); } | ||
catch (_) {} | ||
try { | ||
stat = statSync(homeDownloads); | ||
} catch (_) {} | ||
if (stat) return homeDownloads; | ||
@@ -38,0 +40,0 @@ |
{ | ||
"name": "downloads-folder", | ||
"description": "Get the local downloads folder, for all major platforms", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"license": "MIT", | ||
"repository": "juliangruber/downloads-folder" | ||
"repository": "juliangruber/downloads-folder", | ||
"devDependencies": { | ||
"semistandard": "^9.1.0" | ||
}, | ||
"scripts": { | ||
"test": "semistandard" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2064
41
1