Skip to content

apd: fix some module scripts won't add AP_MODULE environment var#1474

Merged
Admirepowered merged 1 commit into
bmax121:mainfrom
Tools-cx-app:main
May 23, 2026
Merged

apd: fix some module scripts won't add AP_MODULE environment var#1474
Admirepowered merged 1 commit into
bmax121:mainfrom
Tools-cx-app:main

Conversation

@Tools-cx-app

Copy link
Copy Markdown
Contributor

AP_MODULE environment var will only pass in exec_script, that's cause only stage-scripts, action.sh and uninstall scripts have this environment var

So, it cause customize.sh, and meta*.sh won't have this envionment var And module developers will see them can't use apd module config set command, because apd throw
This command must be run in the context of a module or passed --internal <name>

Taking the magic_mount_rs module as an example:
before:

APATCH='true'

after:

APATCH='true'
AP_MODULE='magic_mount_rs'

AP_MODULE environment var will only pass in exec_script, that's cause only stage-scripts, action.sh and uninstall scripts have this environment var

So, it cause customize.sh, and meta*.sh won't have this envionment var
And module developers will see them can't use apd module config set command,
because apd throw
`This command must be run in the context of a module or passed --internal <name>`

Taking the magic_mount_rs module as an example:
before:
```
APATCH='true'
```
after:
```
APATCH='true'
AP_MODULE='magic_mount_rs'
```

Co-authored-by: AlexLiuDev233 <wzylin11@outlook.com>
@Admirepowered Admirepowered merged commit f4ca7d3 into bmax121:main May 23, 2026
1 check passed
Prslc pushed a commit to Prslc/APatch that referenced this pull request May 24, 2026
…x121#1474)

AP_MODULE environment var will only pass in exec_script, that's cause only stage-scripts, action.sh and uninstall scripts have this environment var

So, it cause customize.sh, and meta*.sh won't have this envionment var
And module developers will see them can't use apd module config set command,
because apd throw
`This command must be run in the context of a module or passed --internal <name>`

Taking the magic_mount_rs module as an example:
before:
```
APATCH='true'
```
after:
```
APATCH='true'
AP_MODULE='magic_mount_rs'
```

Co-authored-by: AlexLiuDev233 <wzylin11@outlook.com>
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.

2 participants