commandbox.system.modules_app.system-commands.commands

Class run

lucee.Component
    extended by commandbox.system.modules_app.system-commands.commands.run

Execute an operating system level command in the native shell. The binary must be in the PATH, or you can specify the full path to it. This command will wait for the OS exectuable to complete but will flush the output as it is received. . {code:bash} run myApp.exe run /path/to/myApp {code} . A shortcut for running OS binaries is to prefix the binary with "!". In this mode, any other params need to be positional. There is no CommandBox parsing applied to the command's arguments. They are passed straight to the native shell. . {code:bash} !myApp.exe !/path/to/myApp !dir !npm ll !ipconfig !ping google.com -c 4 {code} . Executing Java would look like this . {code:bash} !java -version !java -jar myLib.jar {code} . You can even call other CLIs . {code:bash} !git init touch index.cfm !git add . !git commit -m "Initial Commit" {code}

Class Attributes:
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any configService


    • access = public
    • returntype = any
    • inject = configService
    true false
    any fileSystemUtil


    • access = public
    • returntype = any
    • inject = fileSystem
    true false
    Method Summary
    any run(any command)
     
    Methods inherited from class lucee.Component
    None

    Property Detail

    configService

    property any configService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - configService
    serializable - true

    fileSystemUtil

    property any fileSystemUtil

    Attributes:
    access - public
    required - false
    returntype - any
    inject - fileSystem
    serializable - true

    Method Detail

    run

    public any run(any command)

    Parameters:
    command - The full operating system command to execute including the binary and any parameters