We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3ced4f2 + 32916e6 commit a654720Copy full SHA for a654720
lib/bashly/script/command.rb
@@ -94,12 +94,13 @@ def full_name
94
# If the file is not found, returns a string with a hint.
95
def load_user_file(file, placeholder: true)
96
path = "#{Settings.source_dir}/#{file}"
97
- default_content = placeholder ? "echo \"error: cannot load file\"" : ''
98
99
content = if File.exist? path
100
File.read(path).remove_front_matter
101
- else
102
- default_content
+ elsif placeholder
+ %q[echo "error: cannot load file"]
+ else
103
+ ''
104
end
105
106
Bashly.production? ? content : "#{view_marker path}\n#{content}"
0 commit comments