You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Running command with run() returns command failed instead of storing variable #3216
I've created a custom deployer recipe with a task where I need to return the disk space of my server, here it is:
task('server:health:check', function () {
$hostname = get('hostname');
$free = run(`php -r 'echo disk_free_space("/");'`);
// perform normal php functions and if statements here
});
The issue with this is it returns exit code 127, command not found:
The command "9441796096" failed.
Except this obviously isn't a command, I simply need the result of the run() method to store it's value inside of my $free variable, why isn't this working as I expect?
I also tried the following...
set('disk_space_free', function () {
returnrun('disk_free_space("/")');
});
Thinking that with the return I could then output {{ disk_space_free }} in another run command, same result.
Activity