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

postinstall script: support monorepos #191

Merged
merged 42 commits into from
Aug 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
799a309
`postinstall` script finds existing `cds-types` installation
chgeo Aug 12, 2024
7e57113
Add test
chgeo Aug 12, 2024
44750e5
Troubleshoot
chgeo Aug 12, 2024
f3cb19c
Merge branch 'main' into install-monorepos
joergmann Aug 13, 2024
577421a
add echo homedir
joergmann Aug 13, 2024
a56e1bf
add homedir
joergmann Aug 13, 2024
1586516
fix var call
joergmann Aug 13, 2024
274d4ef
fix reg path
joergmann Aug 13, 2024
0c135ae
add user login
joergmann Aug 13, 2024
2fb0558
simpler approach
joergmann Aug 13, 2024
aa6c03c
use net user
joergmann Aug 13, 2024
d5c6ddd
quote cmd
joergmann Aug 13, 2024
76ca8e2
correct quoting
joergmann Aug 13, 2024
bdfafa2
set $HOME
joergmann Aug 13, 2024
656c0d4
try global permissions
joergmann Aug 13, 2024
553d3b1
use vars
joergmann Aug 13, 2024
6f45a54
next
joergmann Aug 13, 2024
eb92743
remove envvar
joergmann Aug 13, 2024
bcc1980
netx
joergmann Aug 13, 2024
b1e89d7
external script
joergmann Aug 13, 2024
1a45ac3
go
joergmann Aug 13, 2024
15ed9a2
use reg
joergmann Aug 13, 2024
d9cf97a
echo sid
joergmann Aug 13, 2024
b371fda
next try
joergmann Aug 13, 2024
7e767f7
next try
joergmann Aug 13, 2024
3af7f48
try env:run
joergmann Aug 13, 2024
5806d30
go
joergmann Aug 13, 2024
e4949ec
escape dollar
joergmann Aug 13, 2024
f6d5f88
use \n
joergmann Aug 13, 2024
1afc505
use ticks
joergmann Aug 13, 2024
47d7c92
more quoting
joergmann Aug 13, 2024
dba0fe9
more quoting
joergmann Aug 13, 2024
465acbf
revert
joergmann Aug 13, 2024
bf3f2d6
fix
joergmann Aug 13, 2024
11dd2a5
next
joergmann Aug 13, 2024
1f7b449
add /T
joergmann Aug 13, 2024
1d4fcb7
use home
joergmann Aug 13, 2024
146b169
next
joergmann Aug 13, 2024
c248941
use runneradmin
joergmann Aug 13, 2024
943efe0
fix windows runner script
joergmann Aug 13, 2024
4587622
Remove logs
chgeo Aug 13, 2024
9be508a
Apply suggestions from code review
chgeo Aug 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use net user
joergmann committed Aug 13, 2024
commit aa6c03c41e1d789dbcfc490eabacba46e970906f
6 changes: 5 additions & 1 deletion .github/actions/run-as-non-admin/action.yml
Original file line number Diff line number Diff line change
@@ -40,14 +40,18 @@ runs:

$newHomeDir = "C:\Users\$username"

New-LocalUser $username -Password $password -HomeDirectory $newHomeDir -PasswordNeverExpires:$true
# create non-admin user
New-LocalUser $username -Password $password -PasswordNeverExpires:$true
Add-LocalGroupMember -Group "Users" -Member $username
$credential = New-Object System.Management.Automation.PSCredential ($username, $password)

# Optionally, create the new home directory and set permissions
New-Item -ItemType Directory -Path $newHomeDir
icacls $newHomeDir /grant ${username}:(OI)(CI)F /T

# Set the home directory using net user
net user $username /homedir:$newHomeDir

# remove dev mode so symlink fails if called without junction
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /f