diff options
Diffstat (limited to 'src/poem/recite.rs')
-rw-r--r-- | src/poem/recite.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/poem/recite.rs b/src/poem/recite.rs index a067f3d..d95af92 100644 --- a/src/poem/recite.rs +++ b/src/poem/recite.rs @@ -139,12 +139,15 @@ impl Reciteable for Poem { let status = if index.is_some() { anthology::incant(&verse, index.unwrap(), env) } else { - // Incant the verse, based on its meter - // Check if the verb exists - // If it doesn't exist, try refreshing the binary cache, and check - // again - // If it still doesn't exist, print an error + // Checking for environment variables and running internal + // poems may mean that the verb is empty now, so check it once + // more + // If it is empty, just continue to the next verse if !verse.verb().is_empty() { + // Check if the verb exists on the PATH + // If it doesn't exist, try refreshing the binary cache, and check + // again + // If it still doesn't exist, print an error if !verse.spellcheck(&env.bins) { env.bins = path::refresh(); if !verse.spellcheck(&env.bins) { @@ -159,6 +162,7 @@ impl Reciteable for Poem { continue; } + // Incant the verse, based on its meter if stdout { match verse.io { Rune::Read => Rune::incant_read(&mut verse, &mut out, &mut pids)?, |