Class: Builtins::Exec
Constant Summary
Constants inherited
from Builtin
Builtin::BUILTIN_DIR
Instance Attribute Summary
Attributes inherited from Builtin
#args, #config
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Builtin
class_for, #initialize
Constructor Details
This class inherits a constructor from Builtin
Class Method Details
.description ⇒ Object
6
7
8
|
# File 'lib/builtins/exec.rb', line 6
def description
"executes the given command in the `ops` environment, i.e. with environment variables set"
end
|
Instance Method Details
#run ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/builtins/exec.rb', line 11
def run
Secrets.load if Options.get("exec.load_secrets")
if args.any?
Output.error(Profiler.summary) if Profiler.summary
Kernel.exec(args.join(" "))
else
Output.error("Usage: ops exec '<command>'")
false
end
end
|