Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9824b12

Browse files
author
zhaili
committed
update
1 parent df69a65 commit 9824b12

File tree

3 files changed

+7372
-1268
lines changed

3 files changed

+7372
-1268
lines changed

lib/commands/submit.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ const cmd = {
1515
desc: 'Submit code',
1616
builder: function(yargs) {
1717
return yargs
18+
.option('i', {
19+
alias: 'id',
20+
type: 'string',
21+
default: '',
22+
describe: 'problem id'
23+
})
1824
.positional('filename', {
1925
type: 'string',
2026
describe: 'Code file to submit',
@@ -48,6 +54,7 @@ cmd.handler = function(argv) {
4854
return log.fatal('File ' + argv.filename + ' not exist!');
4955

5056
const meta = file.meta(argv.filename);
57+
if (argv.id !== '') meta.id = argv.id
5158

5259
// translation doesn't affect problem lookup
5360
core.getProblem(meta.id, true, function(e, problem) {

0 commit comments

Comments
 (0)