Skip to content
This repository was archived by the owner on May 29, 2018. It is now read-only.

Commit 73628e4

Browse files
committed
Revert "robust file-not-found check"
This reverts commit 852045d.
1 parent 1c9560d commit 73628e4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cli/store_cmds.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ func Import(buildDataFS vfs.FileSystem, stor interface{}, opt ImportOpt) error {
269269
case *grapher.GraphUnitRule:
270270
var data graph.Output
271271
if err := readJSONFileFS(buildDataFS, rule.Target(), &data); err != nil {
272-
// checking if the error begins with "file not found" is necessary because the FS may not be the actual OS FS, in which case os.IsNotExist(err) == false
273-
if os.IsNotExist(err) || strings.HasPrefix(err.Error(), "file not found:") {
272+
if os.IsNotExist(err) {
274273
log.Printf("Warning: no build data for unit %s %s.", rule.Unit.Type, rule.Unit.Name)
275274
return nil
276275
}

0 commit comments

Comments
 (0)