Skip to content

Commit a0bfe93

Browse files
committed
fix: Add error message when wrong key entered from terminal ct download <downloadKey>
1 parent 87a58fd commit a0bfe93

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/ct/launch/launch.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ proc runInitial*(conf: CodetracerConf) =
108108
conf.uploadTraceFolder,
109109
replayInteractive)
110110
of StartupCommand.download:
111-
downloadCommand(conf.traceRegistryId)
111+
downloadTraceCommand(conf.traceRegistryId)
112112
of StartupCommand.cmdDelete:
113113
deleteTraceCommand(conf.traceId, conf.controlId)
114114
# eventually enable?

src/ct/online_sharing/trace_manager.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ proc unzipFile(zipFile: string, outputDir: string): (string, int) =
4646
zip.close()
4747
return (outPath, traceId)
4848

49-
proc downloadCommand*(traceRegistryId: string) =
49+
proc downloadTraceCommand*(traceRegistryId: string) =
5050
# We expect a traceRegistryId to have <downloadId>::<passwordKey>
5151
let stringSplit = traceRegistryId.split("//")
5252
if stringSplit.len() != 3:
53+
echo "error: Wrong download key! Should be <program_name>//<download_id>//<encryption_password>"
5354
quit(1)
5455
else:
5556
let downloadId = stringSplit[1]

0 commit comments

Comments
 (0)