mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-10 23:01:58 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 63b25bce85 | |||
| dd0bfb4821 | |||
| c1055b73bb | |||
| 3b59542ddd |
@@ -21,18 +21,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
STUB_CHANGED="false"
|
STUB_CHANGED="false"
|
||||||
PATHS=(plugin plugin/decky_plugin.pyi)
|
PATHS=(plugin plugin/decky_plugin.pyi)
|
||||||
SHA=${{ github.sha }}
|
SHA="${{ github.sha }}"
|
||||||
SHA_PREV=$(git rev-list --parents -n 1 $SHA)
|
SHA_PREV=$(git rev-list --parents -n 1 $SHA)
|
||||||
FILES=$(git diff $SHA_PREV..$SHA --name-only -- ${PATHS[@]} | jq -Rsc 'split("\n")[:-1] | join (",")')
|
FILES=$(git diff $SHA_PREV --name-only -- ${PATHS[@]} | jq -Rsc 'split("\n")[:-1] | join (",")')
|
||||||
if [[ "$FILES" == *"plugin/decky_plugin.pyi"* ]]; then
|
if [[ "$FILES" == *"plugin/decky_plugin.pyi"* ]]; then
|
||||||
$STUB_CHANGED="true"
|
STUB_CHANGED="true"
|
||||||
echo "Stub has changed, pushing updated stub"
|
echo "Stub has changed, pushing updated stub"
|
||||||
else
|
else
|
||||||
echo "Stub has not changed, exiting."
|
echo "Stub has not changed, exiting."
|
||||||
echo "has_changed=$STUB_CHANGED" >> $GITHUB_OUTPUT
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "has_changed=$STUB_CHANGED" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Push updated stub
|
- name: Push updated stub
|
||||||
if: steps.changed-stub.outputs.has_changed == true
|
if: steps.changed-stub.outputs.has_changed == true
|
||||||
|
|||||||
+3
-1
@@ -64,8 +64,10 @@ class PluginWrapper:
|
|||||||
# export a bunch of environment variables to help plugin developers
|
# export a bunch of environment variables to help plugin developers
|
||||||
environ["HOME"] = helpers.get_home_path("root" if "root" in self.flags else helpers.get_user())
|
environ["HOME"] = helpers.get_home_path("root" if "root" in self.flags else helpers.get_user())
|
||||||
environ["USER"] = "root" if "root" in self.flags else helpers.get_user()
|
environ["USER"] = "root" if "root" in self.flags else helpers.get_user()
|
||||||
|
environ["USER_ID"] = "0" if "root" in self.flags else helpers.get_user_id()
|
||||||
environ["DECKY_VERSION"] = helpers.get_loader_version()
|
environ["DECKY_VERSION"] = helpers.get_loader_version()
|
||||||
environ["DECKY_USER"] = helpers.get_user()
|
environ["DECKY_USER"] = str(helpers.get_user())
|
||||||
|
environ["DECKY_USER_ID"] = str(helpers.get_user_id())
|
||||||
environ["DECKY_USER_HOME"] = helpers.get_home_path()
|
environ["DECKY_USER_HOME"] = helpers.get_home_path()
|
||||||
environ["DECKY_HOME"] = helpers.get_homebrew_path()
|
environ["DECKY_HOME"] = helpers.get_homebrew_path()
|
||||||
environ["DECKY_PLUGIN_SETTINGS_DIR"] = path.join(environ["DECKY_HOME"], "settings", self.plugin_directory)
|
environ["DECKY_PLUGIN_SETTINGS_DIR"] = path.join(environ["DECKY_HOME"], "settings", self.plugin_directory)
|
||||||
|
|||||||
@@ -38,6 +38,14 @@ It would be `root` if `root` was specified in the plugin's flags otherwise the u
|
|||||||
e.g.: `deck`
|
e.g.: `deck`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
USER_ID: int = int(os.getenv("USER_ID", default="-1"))
|
||||||
|
"""
|
||||||
|
The effective UID running the process.
|
||||||
|
Environment variable: `USER_ID`.
|
||||||
|
It would be `0` if `root` was specified in the plugin's flags otherwise the id of the user whose home decky resides in.
|
||||||
|
e.g.: `1000`
|
||||||
|
"""
|
||||||
|
|
||||||
DECKY_VERSION: str = os.getenv("DECKY_VERSION", default="")
|
DECKY_VERSION: str = os.getenv("DECKY_VERSION", default="")
|
||||||
"""
|
"""
|
||||||
The version of the decky loader.
|
The version of the decky loader.
|
||||||
@@ -52,6 +60,13 @@ Environment variable: `DECKY_USER`.
|
|||||||
e.g.: `deck`
|
e.g.: `deck`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
DECKY_USER_ID: int = int(os.getenv("DECKY_USER_ID", default="-1"))
|
||||||
|
"""
|
||||||
|
The UID of the user whose home decky resides in.
|
||||||
|
Environment variable: `DECKY_USER_ID`.
|
||||||
|
e.g.: `1000`
|
||||||
|
"""
|
||||||
|
|
||||||
DECKY_USER_HOME: str = os.getenv("DECKY_USER_HOME", default="")
|
DECKY_USER_HOME: str = os.getenv("DECKY_USER_HOME", default="")
|
||||||
"""
|
"""
|
||||||
The home of the user where decky resides in.
|
The home of the user where decky resides in.
|
||||||
|
|||||||
@@ -36,6 +36,14 @@ It would be `root` if `root` was specified in the plugin's flags otherwise the u
|
|||||||
e.g.: `deck`
|
e.g.: `deck`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
USER_ID: int
|
||||||
|
"""
|
||||||
|
The effective UID running the process.
|
||||||
|
Environment variable: `UID`.
|
||||||
|
It would be `0` if `root` was specified in the plugin's flags otherwise the id of the user whose home decky resides in.
|
||||||
|
e.g.: `1000`
|
||||||
|
"""
|
||||||
|
|
||||||
DECKY_VERSION: str
|
DECKY_VERSION: str
|
||||||
"""
|
"""
|
||||||
The version of the decky loader.
|
The version of the decky loader.
|
||||||
@@ -50,6 +58,13 @@ Environment variable: `DECKY_USER`.
|
|||||||
e.g.: `deck`
|
e.g.: `deck`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
DECKY_USER_ID: int
|
||||||
|
"""
|
||||||
|
The UID of the user whose home decky resides in.
|
||||||
|
Environment variable: `DECKY_USER_ID`.
|
||||||
|
e.g.: `1000`
|
||||||
|
"""
|
||||||
|
|
||||||
DECKY_USER_HOME: str
|
DECKY_USER_HOME: str
|
||||||
"""
|
"""
|
||||||
The home of the user where decky resides in.
|
The home of the user where decky resides in.
|
||||||
|
|||||||
Reference in New Issue
Block a user