@@ -16,13 +16,11 @@ import {
1616
1717export { githubInvalidTokenMessage } from "./github-token-validation.js"
1818
19- export const githubMissingTokenMessage =
20- [
21- "GitHub auth is missing: no GitHub token/key was found for this repository." ,
22- "If the repository requires access, run: docker-git auth github login --web"
23- ] . join ( "\n" )
24- export const githubRepoAccessWarning =
25- "Unable to validate GitHub repository access before start; continuing."
19+ export const githubMissingTokenMessage = [
20+ "GitHub auth is missing: no GitHub token/key was found for this repository." ,
21+ "If the repository requires access, run: docker-git auth github login --web"
22+ ] . join ( "\n" )
23+ export const githubRepoAccessWarning = "Unable to validate GitHub repository access before start; continuing."
2624
2725export type GithubRepoAccessStatus = "accessible" | "notAccessible" | "unknown"
2826
@@ -167,16 +165,15 @@ export const validateGithubCloneAuthTokenPreflight = (
167165 return
168166 }
169167
170- const token =
171- config . skipGithubAuth === true
172- ? null
173- : yield * _ (
174- Effect . gen ( function * ( __ ) {
175- const fs = yield * __ ( FileSystem . FileSystem )
176- const envText = yield * __ ( readEnvText ( fs , config . envGlobalPath ) )
177- return resolveGithubCloneAuthToken ( envText , config )
178- } )
179- )
168+ const token = config . skipGithubAuth
169+ ? null
170+ : yield * _ (
171+ Effect . gen ( function * ( __ ) {
172+ const fs = yield * __ ( FileSystem . FileSystem )
173+ const envText = yield * __ ( readEnvText ( fs , config . envGlobalPath ) )
174+ return resolveGithubCloneAuthToken ( envText , config )
175+ } )
176+ )
180177
181178 if ( token !== null ) {
182179 const validation = yield * _ ( validateGithubToken ( token ) )
@@ -196,7 +193,8 @@ export const validateGithubCloneAuthTokenPreflight = (
196193 Match . when ( "accessible" , ( ) => Effect . void ) ,
197194 Match . when ( "notAccessible" , ( ) =>
198195 Effect . fail ( new AuthError ( { message : githubRepoAccessMessage ( config . repoUrl , token !== null ) } ) ) ) ,
199- Match . when ( "unknown" , ( ) => Effect . logWarning ( githubRepoAccessWarning ) ) ,
196+ Match . when ( "unknown" , ( ) =>
197+ Effect . logWarning ( githubRepoAccessWarning ) ) ,
200198 Match . exhaustive
201199 )
202200 )
0 commit comments