gerardog/gsudo

Issue: Cannot install office-365-apps-minimal with gsudo

SiyuChen opened this issue · 8 comments

Not sure where is the origin of the problem. Some details have been given at ScoopInstaller/Nonportable#65

image

The office-365-apps-minimal can be smoothly installed within a powershell that is run as administrator, but cannot be installed with a plain powershell + gsudo

I am using the lastest gsudo 1.7.1 and powershell 5.1

Hi. I don't have access to a machine right now. Could you open powershell as administrator the old way (right click, run as admin), then run Scoop Install office....? If the same problem ocurrs without using gsudo, then we can discard gsudo being part of the problem

The office-365-apps-minimal can be smoothly installed within a powershell that is run as administrator, but cannot be installed with a plain powershell + gsudo

Yes, I have done the test. The office-365-apps-minimal package can be smoothly installed within a powershell that is run as administrator (i.e the old way). The problem only takes place when I install office-365-apps-minima with a plain powershell + gsudo (i.e. gsudo scoop install office-365-apps-minimal-np)

Ok. Can you please test:

gsudo cmd /c scoop install office-365-apps-minimal-np

Thanks!! It works. Why is this?

I'm speculating, maybe same issue as #180. powershell v5 has some issues with how gsudo replaces its token. I haven't figured out root cause, but wrapping in a caller process solves the problem.
Scoop has an internal powershell engine, so maybe related. #180 implements an 'gsudo config ExceptionList' to manage the process who fail, and scoop can be added there.

gsudo v1.7.1 should have fixed this problem. On my test machine, it worked fine.
image

See how scoop install xx turns into cmd /c powershell -c scoop install xx, which was what 1.7.1 was about:
image

My (working) scoop version.
image

Are you sure you are using gsudo 1.7.1? (try 'gsudo -v')

Sorry, after checking everything, I found the problem actually originated from the app manifest. Scoop installed the app from afadlallah_scoopBucket by default (I thought it was installed from nonportable). afadlallah_scoopBucket is not under-maintained anymore so it has some bugs.

Sorry again for wasting your time. gsudo is really a fantastic tool!

No problem