This commit is contained in:
Shreyas Goenka 2024-11-21 01:03:10 +01:00
parent 6318c3a1c9
commit 7ec20da83c
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 1 additions and 3 deletions

View File

@ -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, ", "))