Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1] Fixing scheduler switch user with withoutOverlapping together not working #13412

Merged
merged 2 commits into from
May 4, 2016
Merged

Conversation

pulkitjalan
Copy link
Contributor

Fixes #13332

@pulkitjalan pulkitjalan changed the title Fixing scheduler switch user with withoutOverlapping together not working [5.1] Fixing scheduler switch user with withoutOverlapping together not working May 3, 2016
@GrahamCampbell
Copy link
Member

What about windows support?

@pulkitjalan
Copy link
Contributor Author

Ah... Sorry didn't test Windows.

Does sudo -u work on Windows anyway?

Also what terminal on Windows, the native one?

@GrahamCampbell
Copy link
Member

We need to get it to ignore the user flag on windows.

@pulkitjalan
Copy link
Contributor Author

ok, so this be ok? or do you think there should also be a check in the user() function for if windows throw exception?

if (windows_os()) {
    return $command;
}

return $this->user ? 'sudo -u '.$this->user.' -- sh -c \''.$command.'\'' : $command;

@GrahamCampbell
Copy link
Member

I was just thinking: return $this->user && ! windows_os() ? 'sudo -u '.$this->user.' -- sh -c \''.$command.'\'' : $command;

@pulkitjalan
Copy link
Contributor Author

Cool, done that. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants