-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow docker and docker-compose run if WorkDirOuter or IdentityD…
…irOuter does not exist
- Loading branch information
Showing
6 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
type DojoDriverInterface interface { | ||
HandleRun(mergedConfig Config, runID string, envService EnvServiceInterface) int | ||
CleanAfterRun(mergedConfig Config, runID string) int | ||
HandlePull(mergedConfig Config) int | ||
HandleSignal(mergedConfig Config, runID string) int | ||
HandleMultipleSignal(mergedConfig Config, runID string) int | ||
} | ||
|
||
func warnGeneral(fileService FileServiceInterface, config Config, envService EnvServiceInterface, logger *Logger) { | ||
if fileService.FileExists(config.WorkDirOuter) { | ||
if fileService.GetFileUid(config.WorkDirOuter) == 0 { | ||
logger.Log("warn", fmt.Sprintf( | ||
"WorkDirOuter: %s is owned by root, which is not recommended", config.WorkDirOuter)) | ||
} | ||
} else { | ||
logger.Log("warn", fmt.Sprintf( | ||
"WorkDirOuter: %s does not exist", config.WorkDirOuter)) | ||
} | ||
if !fileService.FileExists(config.IdentityDirOuter) { | ||
logger.Log("warn", fmt.Sprintf( | ||
"IdentityDirOuter: %s does not exist", config.IdentityDirOuter)) | ||
} | ||
if envService.IsCurrentUserRoot() { | ||
logger.Log("warn", "Current user is root, which is not recommended") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DOJO_DRIVER=docker | ||
DOJO_WORK_OUTER="./test/test-files/not-existent" |