Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
f2fd72cb
Commit
f2fd72cb
authored
Oct 21, 2013
by
Dane Springmeyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build.js: improve error handling
parent
56632ea2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
build.js
build.js
+7
-1
No files found.
build.js
View file @
f2fd72cb
...
...
@@ -94,6 +94,11 @@ function build(opts,callback) {
}
var
shell_args
=
[
'rebuild'
].
concat
(
opts
.
args
);
var
cmd
=
cp
.
spawn
(
shell_cmd
,
shell_args
,
{
cwd
:
undefined
,
env
:
process
.
env
,
customFds
:
[
0
,
1
,
2
]});
cmd
.
on
(
'error'
,
function
(
err
)
{
if
(
err
)
{
return
callback
(
new
Error
(
"Failed to execute '"
+
shell_cmd
+
' '
+
shell_args
.
join
(
' '
)
+
"' ("
+
err
+
")"
));
}
});
cmd
.
on
(
'close'
,
function
(
err
,
stdout
,
stderr
)
{
if
(
err
)
{
return
callback
(
new
Error
(
"Failed to execute '"
+
shell_cmd
+
' '
+
shell_args
.
join
(
' '
)
+
"' ("
+
err
+
")"
));
...
...
@@ -214,6 +219,7 @@ if (opts.force) {
util
.
download
(
from_shasum
,{
progress
:
false
},
function
(
err
,
expected_shasum_buffer
)
{
if
(
err
)
{
log
(
from_shasum
+
' not found, skipping shasum check ('
+
err
+
')'
);
return
done
();
}
else
{
// now check shasum match
var
expected
=
expected_shasum_buffer
.
toString
().
trim
();
...
...
@@ -221,7 +227,6 @@ if (opts.force) {
return
done
(
new
Error
(
"shasum does not match between remote and local: "
+
expected
+
' '
+
actual_shasum
));
}
else
{
log
(
'Sha1sum matches! '
+
expected
);
}
// we are good: continue
log
(
'Extracting to '
+
opts
.
paths
.
runtime_folder
);
new
targz
().
extract
(
tmpfile
,
opts
.
paths
.
runtime_folder
,
function
(
err
)
{
...
...
@@ -235,6 +240,7 @@ if (opts.force) {
}
});
}
}
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment