Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Timon Stampfli
soicode
Commits
880164b7
Commit
880164b7
authored
Oct 11, 2019
by
Timon Stampfli
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-helperbinary-quoted-arguments' into 'master'
Fix helperbinary quoted arguments See merge request
!2
parents
16f3213e
412961e0
Pipeline
#4922
passed with stages
in 59 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
helper/fetchSoicodeBundle.go
helper/fetchSoicodeBundle.go
+3
-1
src/helperBinary.ts
src/helperBinary.ts
+13
-7
No files found.
helper/fetchSoicodeBundle.go
View file @
880164b7
...
...
@@ -79,12 +79,13 @@ func downloadAndUnpack(url, targetDir string) {
}
tr
:=
tar
.
NewReader
(
r
)
tarUnpackLoop
:
for
{
header
,
err
:=
tr
.
Next
()
switch
{
case
err
==
io
.
EOF
:
re
turn
b
re
ak
tarUnpackLoop
case
err
!=
nil
:
fmt
.
Printf
(
"Failed to extract: %v"
,
err
)
...
...
@@ -117,4 +118,5 @@ func downloadAndUnpack(url, targetDir string) {
f
.
Close
()
}
}
fmt
.
Printf
(
"Fetched Bundle without errors"
)
}
src/helperBinary.ts
View file @
880164b7
...
...
@@ -36,25 +36,31 @@ export async function downloadCompilerBundle(store: Store) {
let
url
=
`https://blob.dolansoft.org/soicode/compilerbundle-
${
platform
}
-
${
flavor
}
.tar.xz`
;
let
targetDir
=
path
.
join
(
store
.
soicodeExtensionDataPath
,
"
bundle
"
,
flavor
);
let
proc
=
child_process
.
exec
(
`
${
getHelperPath
(
`
'
${
getHelperPath
(
store
)}
fetchBundle --url
${
url
}
--targetDir
${
targetDir
}
`
)}
'
fetchBundle --url
'
${
url
}
'
--targetDir
'
${
targetDir
}
'
`
);
console
.
log
(
`
${
getHelperPath
(
`
'
${
getHelperPath
(
store
)}
fetchBundle --url
${
url
}
--targetDir
${
targetDir
}
`
)}
'
fetchBundle --url
'
${
url
}
'
--targetDir
'
${
targetDir
}
'
`
);
let
stdout
=
""
;
proc
.
stdout
.
on
(
"
data
"
,
chunk
=>
{
stdout
+=
chunk
;
});
proc
.
on
(
"
exit
"
,
(
code
,
signal
)
=>
{
console
.
log
(
"
fetching the compilerbundle finished, errorcode:
"
+
code
+
"
stdout:
"
+
stdout
);
if
(
code
!==
0
)
{
console
.
log
(
"
Error fetching the compilerbundle, errorcode:
"
+
vscode
.
window
.
showErrorMessage
(
"
Error fetching the compilerbundle, errorcode:
"
+
code
+
"
stdout:
"
+
"
stdout:
"
+
stdout
);
}
...
...
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