-
Notifications
You must be signed in to change notification settings - Fork 35
feat: add Linux system-wide setup #376
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
Open
Sahilb315
wants to merge
19
commits into
main
Choose a base branch
from
cursor/linux-system-install
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
8f6d0fc
feat: add Linux system-wide setup
Sahilb315 7922606
chore: keep local design documents untracked
Sahilb315 ffd0e7e
fix: harden and simplify Linux system install
Sahilb315 8d1a4b6
fix: clarify system-install doctor alias and shim path checks
Sahilb315 fdd1aea
fix: tighten event-log soft-fail warning prefix
Sahilb315 5d710a7
ci: add Linux system-install e2e and pin pnpm for add flake
Sahilb315 2b53abb
chore: bump packageManager to pnpm 11.10.0 for e2e
Sahilb315 37eed63
ci: use npm init for pnpm e2e to avoid integrity crash
Sahilb315 0d0399f
chore: revert packageManager pin to pnpm 11.1.3
Sahilb315 1c9b16f
fix: harden system-install review findings
Sahilb315 b1aa217
fix: harden doctor PATH checks and attribute cloud events by OS user
Sahilb315 1276a1e
fix: address system-install review findings
Sahilb315 1b17eb2
ci: normalize /usr/local/bin perms before system-install e2e
Sahilb315 479f546
fix: actionable remedy for root-created per-user config dir
Sahilb315 de0fa41
fix: resolve per-user paths from root's own home when running as root
Sahilb315 cd9b45b
fix: triage the unwritable config dir remedy by cause
Sahilb315 e0580b1
ci: pin XDG_CONFIG_HOME for the cross-user e2e step; terse doctor fix
Sahilb315 ad16d8c
fix: adapt event-log error to the two-value remedy signature
Sahilb315 297f516
fix: fall back to env path resolution when root has no passwd entry
Sahilb315 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| package setup | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/safedep/pmg/internal/doctor" | ||
| "github.com/stretchr/testify/assert" | ||
| ) | ||
|
|
||
| func TestPathContainsDir(t *testing.T) { | ||
| assert.True(t, pathContainsDir([]string{"/usr/local/lib/pmg/bin/"}, "/usr/local/lib/pmg/bin")) | ||
| assert.False(t, pathContainsDir([]string{"/usr/local/bin"}, "/usr/local/lib/pmg/bin")) | ||
| assert.False(t, pathContainsDir([]string{"/usr/bin"}, "")) | ||
| } | ||
|
|
||
| func TestSystemInstallAliasesPassDoesNotActivateInterception(t *testing.T) { | ||
| results := []doctor.CheckResult{ | ||
| {Name: checkShellAliases, Status: doctor.StatusPass, Message: "No aliases (system install)"}, | ||
| {Name: checkShimInPath, Status: doctor.StatusFail}, | ||
| } | ||
|
|
||
| assert.False(t, isInterceptionActive(results)) | ||
| } | ||
|
|
||
| func TestAliasesInstalledActivatesInterception(t *testing.T) { | ||
| results := []doctor.CheckResult{ | ||
| {Name: checkShellAliases, Status: doctor.StatusPass, Message: aliasesInstalledMessage}, | ||
| {Name: checkShimInPath, Status: doctor.StatusFail}, | ||
| } | ||
|
|
||
| assert.True(t, isInterceptionActive(results)) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.