mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-01-29 12:19:06 +08:00
Update git configuration commands in RemoteClient to ensure robust URL unsetting
- Modified the git configuration commands to append '|| true' to prevent errors if the specified URLs do not exist. - This change enhances the reliability of the URL clearing process in the RemoteClient class, ensuring smoother execution during token-based authentication setups.
This commit is contained in:
12
dist/index.js
generated
vendored
12
dist/index.js
generated
vendored
@@ -4633,9 +4633,9 @@ class RemoteClient {
|
||||
throw new Error('GIT_PRIVATE_TOKEN is not available');
|
||||
}
|
||||
// Clear any existing URL configurations
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf || true`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`);
|
||||
// Set new URL configuration with token
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "https://github.com/"`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "ssh://git@github.com/"`);
|
||||
@@ -4654,9 +4654,9 @@ class RemoteClient {
|
||||
throw new Error('GITHUB_TOKEN is not available as fallback');
|
||||
}
|
||||
// Clear any existing URL configurations
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf || true`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`);
|
||||
// Set new URL configuration with token
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global url."https://${githubToken}@github.com/".insteadOf "https://github.com/"`);
|
||||
await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global url."https://${githubToken}@github.com/".insteadOf "ssh://git@github.com/"`);
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -232,9 +232,9 @@ export class RemoteClient {
|
||||
}
|
||||
|
||||
// Clear any existing URL configurations
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf`);
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf`);
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf`);
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf || true`);
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`);
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`);
|
||||
|
||||
// Set new URL configuration with token
|
||||
await CloudRunnerSystem.Run(
|
||||
@@ -262,9 +262,9 @@ export class RemoteClient {
|
||||
}
|
||||
|
||||
// Clear any existing URL configurations
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf`);
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf`);
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf`);
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf || true`);
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`);
|
||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`);
|
||||
|
||||
// Set new URL configuration with token
|
||||
await CloudRunnerSystem.Run(
|
||||
|
||||
Reference in New Issue
Block a user