Socket
Socket
Sign inDemoInstall

grunt-run

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-run - npm Package Compare versions

Comparing version 0.1.14 to 0.2.0

2

package.json
{
"name": "grunt-run",
"description": "Invite external commands into your grunt process with three tasks `run`, `wait` and `stop`.",
"version": "0.1.14",
"version": "0.2.0",
"homepage": "https://github.com/spenceralger/grunt-run",

@@ -6,0 +6,0 @@ "author": {

@@ -41,8 +41,5 @@ /*

var name = this.target;
if (getPid(name)) {
grunt.log.warn(name + ' is already running');
return;
}
var cmd = this.data.cmd || 'node';
var args = this.data.args || [];
var additionalArgs = [];
var opts = this.options({

@@ -54,9 +51,6 @@ wait: true,

cwd: process.cwd(),
passArgs: []
passArgs: [],
itterable: false
});
var cmd = this.data.cmd || 'node';
var args = this.data.args || [];
var additionalArgs = [];
var options = {
var spawnOpts = {
cwd: opts.cwd,

@@ -66,2 +60,12 @@ stdio: ['ignore', 'pipe', 'pipe']

if (getPid(name)) {
grunt.log.warn(name + ' is already running');
return;
}
if (!opts.itterable && _.find(process.argv, 'run')) {
grunt.log.warn('Skipping run:' + this.target + ' since it not itterable. Call it directly or from another task.');
return;
}
opts.passArgs.map(function (arg) {

@@ -87,3 +91,3 @@ var val = grunt.option(arg);

args = ['/s', '/c', '"' + this.data.exec + '"'];
options.windowsVerbatimArguments = true;
spawnOpts.windowsVerbatimArguments = true;
} else {

@@ -102,3 +106,3 @@ cmd = '/bin/sh';

grunt.verbose.writeln('running', cmd, 'with args', args);
var proc = child_process.spawn(cmd, args, options);
var proc = child_process.spawn(cmd, args, spawnOpts);
savePid(name, proc.pid);

@@ -105,0 +109,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