-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: return a basic deep tree of dependecies
- Loading branch information
1 parent
6064a26
commit a854e18
Showing
10 changed files
with
163 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var childProcess = require('child_process'); | ||
|
||
module.exports.execute = function (command, args, options) { | ||
|
||
var spawnOptions = { shell: true }; | ||
if (options && options.cwd) { | ||
spawnOptions.cwd = options.cwd; | ||
} | ||
|
||
return new Promise(function (resolve, reject) { | ||
var stdout = ''; | ||
var stderr = ''; | ||
|
||
var proc = childProcess.spawn(command, args, spawnOptions); | ||
proc.stdout.on('data', function (data) { stdout = stdout + data; }); | ||
proc.stderr.on('data', function (data) { stderr = stderr + data; }); | ||
|
||
proc.on('close', function (code) { | ||
if (code !== 0) { | ||
return reject(stdout || stderr); | ||
} | ||
resolve(stdout || stderr); | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
_ "gitpub.com/food/salad" | ||
) | ||
|
||
func main() { | ||
fmt.Println("main") | ||
} |
12 changes: 12 additions & 0 deletions
12
test/fixtures/gopath/src/path/to/pkg/vendor/gitpub.com/food/salad/salad.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
test/fixtures/gopath/src/path/to/pkg/vendor/gitpub.com/nature/vegetables/cucamba/cucamba.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
test/fixtures/gopath/src/path/to/pkg/vendor/gitpub.com/nature/vegetables/tomato/tomato.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters