Compare commits

...

10 Commits

Author SHA1 Message Date
Sean Massa
bae72e4d9d Merge branch 'main' into bypass-multistream 2022-11-14 16:56:03 -06:00
Sean Massa
db398b43c6 simplify syntax 2022-11-14 13:43:34 -06:00
Sean Massa
a2a38322d1 Merge remote-tracking branch 'origin' into bypass-multistream 2022-11-14 13:41:41 -06:00
Nathan Rajlich
e99100a63f Merge branch 'master' into bypass-multistream 2021-02-09 14:57:11 -08:00
Luc Leray
9292c77408 Merge branch 'master' into bypass-multistream 2021-01-29 22:47:42 +01:00
Igor Klopov
d5775a5724 Update packages/now-build-utils/src/fs/download.ts
Co-authored-by: Luc Leray <luc.leray@gmail.com>
2021-01-29 21:11:09 +03:00
igorklopov
c9035ce3d6 File | FileFsRef 2021-01-29 14:03:47 +03:00
igorklopov
224b3bb6f4 try as FileFsRef 2021-01-29 14:00:57 +03:00
igorklopov
6d11c3eee2 try 'in' 2021-01-29 13:27:30 +03:00
igorklopov
0e5d14e481 [build-utils] bypass multistream, better await 2021-01-29 13:18:36 +03:00

View File

@@ -41,7 +41,7 @@ async function prepareSymlinkTarget(
}
export async function downloadFile(
file: File,
file: File | FileFsRef,
fsPath: string
): Promise<FileFsRef> {
const { mode } = file;
@@ -56,7 +56,7 @@ export async function downloadFile(
return FileFsRef.fromFsPath({ mode, fsPath });
}
const stream = file.toStream();
const stream = file instanceof FileFsRef ? await file.toStreamAsync() : file.toStream();
return FileFsRef.fromStream({ mode, stream, fsPath });
}