clipboardy
Advanced tools
Comparing version 1.0.0 to 1.0.1
11
index.js
'use strict'; | ||
const path = require('path'); | ||
const execa = require('execa'); | ||
@@ -26,5 +27,7 @@ | ||
const xsel = path.join(__dirname, 'vendor/xsel'); | ||
const linux = { | ||
copy: opts => { | ||
return execa('./vendor/xsel', ['--clipboard', '--input'], opts) | ||
return execa(xsel, ['--clipboard', '--input'], opts) | ||
.catch(() => execa('xsel', ['--clipboard', '--input'], opts)) | ||
@@ -34,3 +37,3 @@ .catch(handler); | ||
paste: opts => { | ||
return execa.stdout('./vendor/xsel', ['--clipboard', '--output'], opts) | ||
return execa.stdout(xsel, ['--clipboard', '--output'], opts) | ||
.catch(() => execa.stdout('xsel', ['--clipboard', '--output'], opts)) | ||
@@ -41,3 +44,3 @@ .catch(handler); | ||
try { | ||
return execa.sync('./vendor/xsel', ['--clipboard', '--input'], opts); | ||
return execa.sync(xsel, ['--clipboard', '--input'], opts); | ||
} catch (err) { | ||
@@ -53,3 +56,3 @@ try { | ||
try { | ||
return execa.sync('./vendor/xsel', ['--clipboard', '--output'], opts); | ||
return execa.sync(xsel, ['--clipboard', '--output'], opts); | ||
} catch (err) { | ||
@@ -56,0 +59,0 @@ try { |
{ | ||
"name": "clipboardy", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Access the system clipboard (copy/paste)", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
134844
80