Skip to content

Commit

Permalink
feat: upstream-registry auth is always null
Browse files Browse the repository at this point in the history
You won't every really need authentication for the unity registry.
  • Loading branch information
ComradeVanti committed Mar 20, 2024
1 parent 842ebc5 commit fb1178a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,13 @@ function determinePrimaryRegistry(
return { url, auth };
}

function determineUpstreamRegistry(
options: CmdOptions,
upmConfig: UPMConfig | null
): Registry {
function determineUpstreamRegistry(options: CmdOptions): Registry {
const url =
options._global.cn === true
? makeRegistryUrl("https://packages.unity.cn")
: makeRegistryUrl("https://packages.unity.com");

const auth =
upmConfig !== null ? tryGetAuthForRegistry(upmConfig, url) : null;

return { url, auth };
return { url, auth: null };
}

function determineLogLevel(options: CmdOptions): "verbose" | "notice" {
Expand Down Expand Up @@ -131,7 +125,7 @@ export const parseEnv = async function (
const upmConfig = upmConfigResult.value;

const registry = determinePrimaryRegistry(options, upmConfig);
const upstreamRegistry = determineUpstreamRegistry(options, upmConfig);
const upstreamRegistry = determineUpstreamRegistry(options);

// cwd
const cwdResult = determineCwd(options);
Expand Down

0 comments on commit fb1178a

Please sign in to comment.