Petals ESB CLI

Unable to execute system command with arguments

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.1.2
  • Fix Version/s: 2.1.2, 2.2.0
  • Component/s: Command 'system'
  • Security Level: Public
  • Description:

    The following command line does not print the expected result: linux

    cdeneux@cdeneux-laptop:~$ petals-cli -c -- system echo linux
    
    cdeneux@cdeneux-laptop:~$
  • Environment:
    -

Activity

Hide
Christophe DENEUX added a comment - Wed, 7 May 2014 - 10:32:57 +0200 - edited

This is due to that the command system accepts only one argument. In the explain case, the argument taken into account by the command is 'echo'. The argument 'linux' is skiped.

A workaround, for version prior to 4.2, is to enclosed the complete system command with quotes: petals-cli -c system "echo linux"

Show
Christophe DENEUX added a comment - Wed, 7 May 2014 - 10:32:57 +0200 - edited This is due to that the command system accepts only one argument. In the explain case, the argument taken into account by the command is 'echo'. The argument 'linux' is skiped. A workaround, for version prior to 4.2, is to enclosed the complete system command with quotes: petals-cli -c system "echo linux"
Christophe DENEUX made changes - Wed, 7 May 2014 - 10:32:57 +0200
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Major [ 3 ]
Christophe DENEUX made changes - Wed, 7 May 2014 - 11:12:14 +0200
Status Open [ 10002 ] In Progress [ 10003 ]
Hide
Christophe DENEUX added a comment - Wed, 7 May 2014 - 11:13:17 +0200 - edited

Workaround with quotes for 2.1.2
In version 2.2.0, quotes are not required:

cdeneux@cdeneux-laptop:~$ petals-cli -c -- system echo linux
linux
cdeneux@cdeneux-laptop:~$ petals-cli -c -- system "echo linux"
linux
Show
Christophe DENEUX added a comment - Wed, 7 May 2014 - 11:13:17 +0200 - edited Workaround with quotes for 2.1.2 In version 2.2.0, quotes are not required:
cdeneux@cdeneux-laptop:~$ petals-cli -c -- system echo linux
linux
cdeneux@cdeneux-laptop:~$ petals-cli -c -- system "echo linux"
linux
Christophe DENEUX made changes - Wed, 7 May 2014 - 11:13:17 +0200
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 2.2.0 [ 10404 ]
Fix Version/s 2.1.2 [ 10442 ]
Resolution Fixed [ 1 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
4m 1s
1
Christophe DENEUX
Wed, 7 May 2014 - 10:32:57 +0200
Open Open In Progress In Progress
39m 17s
1
Christophe DENEUX
Wed, 7 May 2014 - 11:12:14 +0200
In Progress In Progress Resolved Resolved
1m 3s
1
Christophe DENEUX
Wed, 7 May 2014 - 11:13:17 +0200

People

Dates

  • Created:
    Wed, 7 May 2014 - 10:28:56 +0200
    Updated:
    Wed, 7 May 2014 - 11:14:11 +0200
    Resolved:
    Wed, 7 May 2014 - 11:13:17 +0200