Skip to content

add package json module#1

Merged
anonrig merged 2 commits intomainfrom
package-json
Jul 12, 2023
Merged

add package json module#1
anonrig merged 2 commits intomainfrom
package-json

Conversation

@anonrig
Copy link
Copy Markdown
Member

@anonrig anonrig commented Jul 12, 2023

No description provided.

@anonrig anonrig merged commit a19e661 into main Jul 12, 2023
@anonrig anonrig deleted the package-json branch July 12, 2023 21:45
@steveklabnik steveklabnik mentioned this pull request Jul 12, 2023
@KSXGitHub KSXGitHub mentioned this pull request Apr 30, 2026
KSXGitHub pushed a commit that referenced this pull request Apr 30, 2026
#1 (parse_shebang args leading whitespace): `splitn(2, [' ', '\t'])`
discarded the whitespace separator, so an upstream-format `#!/bin/sh -e`
parsed to `args="-e"` and the rendered shim text emitted one space
between prog and the first flag where upstream emits two. Replace
`splitn` with a manual `find([' ', '\t'])` + `split_at` that keeps the
separator in the args slice, matching upstream's regex group `(.*)$`.
Update `parses_direct_shebang` and `parses_env_dash_s_shebang` to
assert the leading-space form so the regression direction is pinned.

#2 (idempotent skip checked only `.sh` but skipped writes for all
three): if a previous install wrote `.sh` correctly but `.cmd`/`.ps1`
were missing — older pacquet, partial-write crash — `already_correct`
short-circuited and the upgrade path never repaired the siblings.
Gate `already_correct` on the `.sh` marker AND the existence of both
`.cmd` and `.ps1`. Add `link_bins_rewrites_when_only_sh_flavor_exists`
which deletes the two siblings and verifies the second `link_bins`
pass re-creates them. Verified by re-breaking the gate temporarily
and confirming the new test fails, then reverting.

Findings 3, 4, 5, 9 are pending review acceptance; they'll land in a
follow-up commit.
@KSXGitHub KSXGitHub mentioned this pull request May 7, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant