Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve npm logs #199

Merged
merged 29 commits into from
Sep 28, 2023
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6f4d83a
copy dir
sverdlov93 Aug 31, 2023
99ea1c7
copy dir
sverdlov93 Aug 31, 2023
a2be3c3
copy dir
sverdlov93 Aug 31, 2023
15c2382
copy dir
sverdlov93 Aug 31, 2023
d1ba553
copy dir
sverdlov93 Aug 31, 2023
8d2df18
Merge branch 'dev' of https://github.com/jfrog/build-info-go into cop…
sverdlov93 Aug 31, 2023
43f807c
copy dir
sverdlov93 Aug 31, 2023
6588932
Merge branch 'dev' of https://github.com/jfrog/build-info-go into cop…
sverdlov93 Sep 10, 2023
71df92d
fix build script
sverdlov93 Sep 10, 2023
417516b
Update release/pipelines.yml
sverdlov93 Sep 10, 2023
d37e048
fix build script
sverdlov93 Sep 10, 2023
014b05b
Merge branch 'fix-script' of https://github.com/jfrog/build-info-go i…
sverdlov93 Sep 10, 2023
d15dfa7
fix build script
sverdlov93 Sep 10, 2023
3f6f620
fix build script
sverdlov93 Sep 12, 2023
4723df3
fix build script
sverdlov93 Sep 14, 2023
b9c2b05
fix build script
sverdlov93 Sep 14, 2023
6e1e42a
fix build script
sverdlov93 Sep 14, 2023
1a05c72
Merge branch 'dev' of https://github.com/jfrog/build-info-go into cop…
sverdlov93 Sep 14, 2023
8ecbe93
fix build script
sverdlov93 Sep 14, 2023
08989d7
fix build script
sverdlov93 Sep 14, 2023
46d3a23
Merge branch 'dev' of https://github.com/jfrog/build-info-go into cop…
sverdlov93 Sep 20, 2023
a6875ca
fix build script
sverdlov93 Sep 20, 2023
cf1f3c5
Update utils/fileutils.go
sverdlov93 Sep 26, 2023
b280efb
fix build script
sverdlov93 Sep 26, 2023
8685f45
Merge branch 'fix-scripts' of https://github.com/sverdlov93/build-inf…
sverdlov93 Sep 26, 2023
c94d472
fix build script
sverdlov93 Sep 26, 2023
c98060b
Merge branch 'dev' of https://github.com/jfrog/build-info-go into cop…
sverdlov93 Sep 27, 2023
74d3cd1
fix build script
sverdlov93 Sep 27, 2023
59bf15d
Merge branch 'dev' into fix-scripts
sverdlov93 Sep 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions build/utils/npm.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,13 @@ func appendScopes(oldScopes []string, newScopes []string) []string {
}

func RunNpmCmd(executablePath, srcPath string, npmArgs []string, log utils.Log) (stdResult, errResult []byte, err error) {
log.Debug("Running npm " + npmArgs[0] + " command.")
args := make([]string, 0)
for i := 0; i < len(npmArgs); i++ {
if strings.TrimSpace(npmArgs[i]) != "" {
args = append(args, npmArgs[i])
}
}

log.Debug("Running 'npm " + strings.Join(npmArgs, " ") + "' command.")
command := exec.Command(executablePath, args...)
command.Dir = srcPath
outBuffer := bytes.NewBuffer([]byte{})
Expand All @@ -369,7 +368,7 @@ func RunNpmCmd(executablePath, srcPath string, npmArgs []string, log utils.Log)
errResult = errBuffer.Bytes()
stdResult = outBuffer.Bytes()
if err != nil {
err = fmt.Errorf("error while running '%s %s': %s\n%s", executablePath, strings.Join(args, " "), strings.TrimSpace(string(errResult)), err.Error())
err = fmt.Errorf("error while running '%s %s': %s\n%s", executablePath, strings.Join(args, " "), err.Error(), strings.TrimSpace(string(errResult)))
return
}
log.Debug("npm '" + strings.Join(args, " ") + "' standard output is:\n" + strings.TrimSpace(string(stdResult)))
Expand Down
Loading