File tree 3 files changed +9
-4
lines changed
3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 5
5
"description" : " Open any workspace with a single click." ,
6
6
"repository" : " https://github.com/coder/vscode-coder" ,
7
7
"preview" : true ,
8
- "version" : " 0.1.3 " ,
8
+ "version" : " 0.1.4 " ,
9
9
"engines" : {
10
10
"vscode" : " ^1.73.0"
11
11
},
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
86
86
await remote . setup ( vscodeProposed . env . remoteAuthority )
87
87
} catch ( ex ) {
88
88
await vscodeProposed . window . showErrorMessage ( "Failed to open workspace" , {
89
- detail : typeof ex === " string" ? ex : JSON . stringify ( ex ) ,
89
+ detail : ( ex as string ) . toString ( ) ,
90
90
modal : true ,
91
91
useCustom : true ,
92
92
} )
Original file line number Diff line number Diff line change @@ -165,7 +165,12 @@ export class Storage {
165
165
cancelled = true
166
166
} )
167
167
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
+
169
174
const writeStream = createWriteStream ( binPath , {
170
175
autoClose : true ,
171
176
mode : 0o755 ,
@@ -175,7 +180,7 @@ export class Storage {
175
180
writeStream . write ( buffer , ( ) => {
176
181
written += buffer . byteLength
177
182
progress . report ( {
178
- message : `${ prettyBytes ( written ) } / ${ contentLengthPretty } ` ,
183
+ message : `${ prettyBytes ( written ) } ${ contentLengthPretty } ` ,
179
184
increment : ( buffer . byteLength / contentLength ) * 100 ,
180
185
} )
181
186
} )
You can’t perform that action at this time.
0 commit comments