mirror of
https://github.com/depp/syncfiles.git
synced 2025-01-05 02:31:18 +00:00
Allow data generator to be run directly from Bazel
When run from Bazel without additional arguments, it will write data files directly to the source directory.
This commit is contained in:
parent
7e7a6a9da2
commit
491950e57d
@ -26,6 +26,10 @@ func getSrcdir() (string, error) {
|
||||
if flagSrc != "" {
|
||||
return flagSrc, nil
|
||||
}
|
||||
workspace := os.Getenv("BUILD_WORKSPACE_DIRECTORY")
|
||||
if workspace != "" {
|
||||
return workspace, nil
|
||||
}
|
||||
exe, err := os.Executable()
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
Loading…
Reference in New Issue
Block a user