mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 14:56:14 +01:00
Transfer the name of the input file to vc
instead of the content and let vc do the rest. This prevents calling echo -e and interpreting escape characters.
This commit is contained in:
parent
e7e91709ef
commit
edc2bde460
@ -8920,10 +8920,14 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
cmd_list.append("-m")
|
||||
cmd_list.append(opts.message)
|
||||
if opts.file:
|
||||
if not os.path.isfile(opts.file):
|
||||
if len(args) > 1:
|
||||
raise oscerr.WrongOptions('--file and file_with_comment are mutually exclusive')
|
||||
elif not os.path.isfile(opts.file):
|
||||
raise oscerr.WrongOptions('\'%s\': is no file' % opts.file)
|
||||
cmd_list.append("-m")
|
||||
cmd_list.append(open(opts.file).read().strip())
|
||||
args = list(args)
|
||||
if not args:
|
||||
cmd_list.append('')
|
||||
cmd_list.append(opts.file)
|
||||
|
||||
if opts.just_edit:
|
||||
cmd_list.append("-e")
|
||||
|
Loading…
Reference in New Issue
Block a user