Skip to content

Commit a558267

Browse files
committed
update saving
1 parent 48cabc4 commit a558267

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/download-aliyun.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import path from 'path';
2+
import fs from 'fs';
23
import OSS from 'ali-oss';
34

45
const args = process.argv.slice(2);
@@ -25,7 +26,10 @@ const store = new OSS({
2526

2627
console.info(`downloading ${ossFilename}...`);
2728
const resp = await store.get(
28-
`web-assets/yodaos-jsar/runtime-artifacts/${ossFilename}`,
29-
artifactFilename.href
29+
`web-assets/yodaos-jsar/runtime-artifacts/${ossFilename}`
3030
);
3131
console.info(resp);
32+
if (resp.content) {
33+
console.info(`saving "${resp.content}" => (${artifactFilename})`);
34+
fs.writeFileSync(artifactFilename, resp.content);
35+
}

0 commit comments

Comments
 (0)