removed need for '-p' flag
This commit is contained in:
parent
993bf58ecd
commit
bc8a62666b
2 changed files with 25 additions and 6 deletions
17
main.go
17
main.go
|
@ -130,8 +130,21 @@ func main() {
|
|||
}
|
||||
fmt.Printf("Initial working directory: %s\n", initialDir)
|
||||
|
||||
// Convert buildPath and uploadPath to absolute paths
|
||||
if buildPath != "" {
|
||||
// Determine buildPath dynamically if not provided
|
||||
if buildPath == "" {
|
||||
sourcePath, err := spitfire.ResolvePath("./mozilla-central")
|
||||
if err != nil {
|
||||
log.Fatalf("Error resolving source path: %v", err)
|
||||
}
|
||||
|
||||
resolvedBuildPath, err := spitfire.ResolveBuildDir(sourcePath)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to detect build directory dynamically: %v", err)
|
||||
}
|
||||
buildPath = resolvedBuildPath
|
||||
fmt.Printf("Automatically detected buildPath: %s\n", buildPath)
|
||||
} else {
|
||||
// Convert buildPath to absolute path
|
||||
buildPath, err2 = spitfire.ResolvePath(buildPath)
|
||||
if err2 != nil {
|
||||
log.Fatalf("Failed to convert buildPath to absolute path: %v", err2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue