From 7ec20da83c35fa2102052bacc4d4b96d93f3960a Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Thu, 21 Nov 2024 01:03:10 +0100 Subject: [PATCH] =- --- bundle/config/mutator/translate_paths.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bundle/config/mutator/translate_paths.go b/bundle/config/mutator/translate_paths.go index 5733d0a6..b1d3e29c 100644 --- a/bundle/config/mutator/translate_paths.go +++ b/bundle/config/mutator/translate_paths.go @@ -143,9 +143,7 @@ func (t *translateContext) translateNotebookPath(literal, localFullPath, localRe for _, ext := range extensions { literalWithExt := literal + ext localRelPathWithExt := filepath.ToSlash(localRelPath + ext) - // TODO: inline the err call. - _, err := fs.Stat(t.b.SyncRoot, localRelPathWithExt) - if err == nil { + if _, err := fs.Stat(t.b.SyncRoot, localRelPathWithExt); err == nil { return "", fmt.Errorf(`notebook %s not found. Did you mean %s? Local notebook references are expected to contain one of the following file extensions: [%s]`, literal, literalWithExt, strings.Join(extensions, ", "))