Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

trash

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trash - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

license

14

cli.js

@@ -10,3 +10,3 @@ #!/usr/bin/env node

'Usage',
' trash <path> [<path> ...]',
' trash [--force] <path> [<path> ...]',
'',

@@ -17,5 +17,8 @@ 'Example',

}, {
string: ['_']
string: ['_'],
boolean: ['force']
});
var errExitCode = cli.flags.force ? 0 : 1;
updateNotifier({

@@ -26,7 +29,12 @@ packageName: cli.pkg.name,

if (cli.input.length === 0) {
console.error('You need to specify at least one path');
process.exit(errExitCode);
}
trash(cli.input, function (err) {
if (err) {
console.error(err.message);
process.exit(1);
process.exit(errExitCode);
}
});
{
"name": "trash",
"version": "1.2.0",
"version": "1.3.0",
"description": "Cross-platform command-line app for moving files and directories to the trash - A safer alternative to `rm`",

@@ -45,3 +45,3 @@ "license": "MIT",

"escape-string-applescript": "^1.0.0",
"meow": "^1.0.0",
"meow": "^2.0.0",
"run-applescript": "^1.0.0",

@@ -48,0 +48,0 @@ "update-notifier": "^0.2.1",

@@ -23,3 +23,3 @@ # ![trash](https://cdn.rawgit.com/sindresorhus/trash/3aa70853f1efb58d0d2512e32d617d246c88953c/media/logo.svg)

Usage
trash <path> [<path> ...]
trash [--force] <path> [<path> ...]

@@ -32,3 +32,11 @@ Example

The `--force` option makes it always succeed even on errors by exiting with code `1`:
```sh
$ trash --force build && BUILDSTUFF
```
This can be useful when used in platform agnostic scripts like [`npm` package.json scripts](https://docs.npmjs.com/misc/scripts), as eg. `trash build; BUILDSTUFF` doesn't work on Windows.
## API

@@ -35,0 +43,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc