Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson committed Aug 15, 2024
1 parent a5a6bb2 commit cea27d0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34713,6 +34713,7 @@ async function getLatestHubVersion() {
}
const ignoredLines = [
`This error originated either by throwing inside of an async function without a catch block`,
`Unexpected error attempting to determine if executable file exists`,
`dri3 extension not supported`,
`Failed to connect to the bus:`
];
Expand All @@ -34737,8 +34738,8 @@ async function execUnityHub(args) {
});
break;
case 'linux':
core.info(`[command]xvfb-run --auto-servernum "${hubPath}" --headless ${args.join(' ')}`);
await exec.exec('xvfb-run', ['--auto-servernum', hubPath, '--headless', ...args], {
core.info(`[command]unity-hub --headless ${args.join(' ')}`);
await exec.exec('unity-hub', ['--headless', ...args], {
listeners: {
stdline: (data) => {
const line = data.toString();
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/install-unityhub-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg]
sudo apt-get update
sudo apt-get install -y --no-install-recommends desktop-file-utils unityhub
sudo apt-get clean
sudo sed -i 's/^\(.*DISPLAY=:.*XAUTHORITY=.*\)\( "\$@" \)2>&1$/\1\2/' /usr/bin/xvfb-run
sudo printf '#!/bin/bash\nxvfb-run --auto-servernum /opt/unityhub/unityhub "$@" 2>/dev/null' | sudo tee /usr/bin/unity-hub >/dev/null
sudo chmod 777 /usr/bin/unity-hub
hubPath=$(which unityhub)
if [ -z "$hubPath" ]; then
echo "Failed to install Unity Hub"
Expand Down
3 changes: 3 additions & 0 deletions src/install-unityhub-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg]
sudo apt-get update
sudo apt-get install -y --no-install-recommends desktop-file-utils unityhub
sudo apt-get clean
sudo sed -i 's/^\(.*DISPLAY=:.*XAUTHORITY=.*\)\( "\$@" \)2>&1$/\1\2/' /usr/bin/xvfb-run
sudo printf '#!/bin/bash\nxvfb-run --auto-servernum /opt/unityhub/unityhub "$@" 2>/dev/null' | sudo tee /usr/bin/unity-hub >/dev/null
sudo chmod 777 /usr/bin/unity-hub
hubPath=$(which unityhub)
if [ -z "$hubPath" ]; then
echo "Failed to install Unity Hub"
Expand Down
7 changes: 4 additions & 3 deletions src/unity-hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ async function getLatestHubVersion(): Promise<semver.SemVer> {

const ignoredLines = [
`This error originated either by throwing inside of an async function without a catch block`,
`Unexpected error attempting to determine if executable file exists`,
`dri3 extension not supported`,
`Failed to connect to the bus:`
];
Expand All @@ -178,9 +179,9 @@ async function execUnityHub(args: string[]): Promise<string> {
ignoreReturnCode: true
});
break;
case 'linux': // xvfb-run --auto-servernum "/opt/unityhub/unityhub" --headless help
core.info(`[command]xvfb-run --auto-servernum "${hubPath}" --headless ${args.join(' ')}`);
await exec.exec('xvfb-run', ['--auto-servernum', hubPath, '--headless', ...args], {
case 'linux': // unity-hub --headless help
core.info(`[command]unity-hub --headless ${args.join(' ')}`);
await exec.exec('unity-hub', ['--headless', ...args], {
listeners: {
stdline: (data) => {
const line = data.toString();
Expand Down

0 comments on commit cea27d0

Please sign in to comment.