Refactor build and topdata path resolution through project config
This commit is contained in:
+5
-2
@@ -358,6 +358,9 @@ func runExtract(ctx context) error {
|
||||
if len(result.HAKPaths) > 0 {
|
||||
fmt.Fprintf(ctx.stdout, "hak archives: %d\n", len(result.HAKPaths))
|
||||
}
|
||||
if len(result.DeletedArchivePaths) > 0 {
|
||||
fmt.Fprintf(ctx.stdout, "deleted archives: %d\n", len(result.DeletedArchivePaths))
|
||||
}
|
||||
fmt.Fprintf(ctx.stdout, "written: %d\n", result.Written)
|
||||
fmt.Fprintf(ctx.stdout, "overwritten: %d\n", result.Overwritten)
|
||||
fmt.Fprintf(ctx.stdout, "removed: %d\n", result.Removed)
|
||||
@@ -444,7 +447,7 @@ func runApplyHAKManifest(ctx context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
manifestPath := filepath.Join(p.BuildDir(), "haks.json")
|
||||
manifestPath := p.HAKManifestPath()
|
||||
if len(ctx.args) > 1 {
|
||||
manifestPath = ctx.args[1]
|
||||
if !filepath.IsAbs(manifestPath) {
|
||||
@@ -788,7 +791,7 @@ func loadProject(cwd string) (*project.Project, error) {
|
||||
return nil, errors.Join(failures...)
|
||||
}
|
||||
|
||||
return p, nil
|
||||
return p, nil
|
||||
}
|
||||
|
||||
func printUsage(w io.Writer) {
|
||||
|
||||
Reference in New Issue
Block a user