File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 55 "description" : " Open any workspace with a single click." ,
66 "repository" : " https://github.com/coder/vscode-coder" ,
77 "preview" : true ,
8- "version" : " 0.1.3 " ,
8+ "version" : " 0.1.4 " ,
99 "engines" : {
1010 "vscode" : " ^1.73.0"
1111 },
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
8686 await remote . setup ( vscodeProposed . env . remoteAuthority )
8787 } catch ( ex ) {
8888 await vscodeProposed . window . showErrorMessage ( "Failed to open workspace" , {
89- detail : typeof ex === " string" ? ex : JSON . stringify ( ex ) ,
89+ detail : ( ex as string ) . toString ( ) ,
9090 modal : true ,
9191 useCustom : true ,
9292 } )
Original file line number Diff line number Diff line change @@ -165,7 +165,12 @@ export class Storage {
165165 cancelled = true
166166 } )
167167
168- const contentLengthPretty = prettyBytes ( contentLength )
168+ let contentLengthPretty = ""
169+ // Reverse proxies might not always send a content length!
170+ if ( ! Number . isNaN ( contentLength ) ) {
171+ contentLengthPretty = " / " + prettyBytes ( contentLength )
172+ }
173+
169174 const writeStream = createWriteStream ( binPath , {
170175 autoClose : true ,
171176 mode : 0o755 ,
@@ -175,7 +180,7 @@ export class Storage {
175180 writeStream . write ( buffer , ( ) => {
176181 written += buffer . byteLength
177182 progress . report ( {
178- message : `${ prettyBytes ( written ) } / ${ contentLengthPretty } ` ,
183+ message : `${ prettyBytes ( written ) } ${ contentLengthPretty } ` ,
179184 increment : ( buffer . byteLength / contentLength ) * 100 ,
180185 } )
181186 } )
You can’t perform that action at this time.
0 commit comments