Fix UID Windows#175
Conversation
Codecov Report
@@ Coverage Diff @@
## master #175 +/- ##
==========================================
+ Coverage 86.62% 89.37% +2.74%
==========================================
Files 49 52 +3
Lines 1563 1609 +46
==========================================
+ Hits 1354 1438 +84
+ Misses 190 145 -45
- Partials 19 26 +7
Continue to review full report at Codecov.
|
danielsuguimoto
left a comment
There was a problem hiding this comment.
Can't we merge asuser and uid files? They are already sharing the uid() function, so keeping both in a single file could be more readable, IMO. But let's check the other's opinions
fabriciojs
left a comment
There was a problem hiding this comment.
Awesome! Thanks for improving the Windows experience!
Just one note about resilience to avoid errors on unexpected environments.
| for i, name := range match { | ||
| results[sidExp.SubexpNames()[i]] = name | ||
| } | ||
| return results["uid"] |
There was a problem hiding this comment.
what is the chance we run this in a different version of windows, and for some reason we do not get a proper "uid" match from FindStringSubmatch above?
I guess we should here check IF the "uid" key exists, and then return its value; other wise I guess we should not break but instead we can default to the old behaviour?
There was a problem hiding this comment.
I did it.
I tried to do a unit test to get this error, but I couldn't, I commented where the test failed.
I wanted to simulate a case of divine work. 😄
|
This is related to #42 |
|
@danielsuguimoto you can review and then merge! |
Correction of generating uid for Windows and installing does not add kool on Windows startup.
So, in this case, the uid used is 1013, this solve the problem to use root, but it still has problems as in other cases that we saw in linux in docker images
./build_artifacts.sh --version 1.6.0