Merge lp:~elopio/snappy/sudo_path into lp:~snappy-dev/snappy/snappy-moved-to-github
Proposed by
Leo Arias
on 2015-08-26
| Status: | Merged |
|---|---|
| Merge reported by: | Leo Arias |
| Merged at revision: | not available |
| Proposed branch: | lp:~elopio/snappy/sudo_path |
| Merge into: | lp:~snappy-dev/snappy/snappy-moved-to-github |
| Diff against target: |
23 lines (+11/-0) 1 file modified
_integration-tests/reboot-wrapper (+11/-0) |
| To merge this branch: | bzr merge lp:~elopio/snappy/sudo_path |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Sergio Schvezov | 2015-08-26 | Needs Information on 2015-08-26 | |
| Federico Gimenez | continuous-integration | Pending | |
|
Review via email:
|
|||
Commit Message
Added a sudo wrapper that preserves the user path.
To post a comment you must log in.
lp:~elopio/snappy/sudo_path
updated
on 2015-08-26
| Leo Arias (elopio) wrote : | # |
That works. The problem with that approach is that we would have to do the same for every sudo call.
We could write a helper called ExecSudoCommand, if you prefer that.
| Sergio Schvezov (sergiusens) wrote : | # |
Oh, I'll leave it to your preference, we used to have run_with and run in phablet-test-run, made it easy to get it at a first glance.
I you prefer this, you have my ack to self approve though ;-)
| Leo Arias (elopio) wrote : | # |
I hate both ways. mvo found this, so maybe he'll have a preference.
| Leo Arias (elopio) wrote : | # |
| Leo Arias (elopio) wrote : | # |
Wrong link. Merged into https:/


Have you tried something like "/bin/sh" , "-c", "sudo env PATH=$PATH ...")
Maybe expand PATH using os.ExpandEnv
cmd := exec.Command(