[GH-ISSUE #245] Add RunAsUser and env vars to Community scripts .json for prefilled default deployment #7

Open
opened 2026-03-02 02:10:04 +03:00 by kerem · 1 comment
Owner

Originally created by @silversword411 on GitHub (Aug 14, 2024).
Original GitHub issue: https://github.com/amidaware/community-scripts/issues/245

Originally created by @silversword411 on GitHub (Aug 14, 2024). Original GitHub issue: https://github.com/amidaware/community-scripts/issues/245
Author
Owner

@cdp1337 commented on GitHub (Aug 14, 2024):

Issue:

When creating a custom script meant for deployment, it is possible to assign default execution parameters to the scripts as per https://github.com/amidaware/community-scripts/blob/main/community_scripts.schema.json (refer to the following directive:

"args": {
        "description": "The script arguments listed as an array.",
        "type": "array",
        "items": {
          "type": "string"
        }
      },

However, at the moment it is not possible to define defaults for environmental variables and the Windows-only option of "Run As User".

For the environmental variables option, it makes sense to stick with the same format as args as they share similar functionality, (just different implementations).

Proposal:

"env": {
        "description": "The environmental variables when running the script listed as an array.",
        "type": "array",
        "items": {
          "type": "string"
        }
      },
"run_as_user": {
        "description": "Run this script as the active user as opposed to System (Windows only)",
        "type": "boolean"
      },

Be added to the schema and modification of the underlying script importer (if necessary), to support these new defaults.

(Example proposal, obviously feel free to implement how you see fit)

<!-- gh-comment-id:2289335358 --> @cdp1337 commented on GitHub (Aug 14, 2024): **Issue:** When creating a custom script meant for deployment, it is possible to assign default execution parameters to the scripts as per https://github.com/amidaware/community-scripts/blob/main/community_scripts.schema.json (refer to the following directive: ```json "args": { "description": "The script arguments listed as an array.", "type": "array", "items": { "type": "string" } }, ``` However, at the moment it is not possible to define defaults for environmental variables and the Windows-only option of "Run As User". For the environmental variables option, it makes sense to stick with the same format as `args` as they share similar functionality, (just different implementations). **Proposal:** ```json "env": { "description": "The environmental variables when running the script listed as an array.", "type": "array", "items": { "type": "string" } }, "run_as_user": { "description": "Run this script as the active user as opposed to System (Windows only)", "type": "boolean" }, ``` Be added to the schema and modification of the underlying script importer (if necessary), to support these new defaults. (Example proposal, obviously feel free to implement how you see fit)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/community-scripts#7
No description provided.