Skip to content

Commit c694ea6

Browse files
committed
fix: always early exit if no sources to lint
1 parent 4208d18 commit c694ea6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

crates/forge/src/cmd/build.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,12 @@ impl BuildArgs {
176176

177177
let solar_sources =
178178
get_solar_sources_from_compile_output(config, output, Some(&input_files))?;
179-
if solar_sources.input.sources.is_empty() && !input_files.is_empty() {
180-
sh_warn!("unable to lint. Solar only supports Solidity versions prior to 0.8.0")?;
179+
if solar_sources.input.sources.is_empty() {
180+
if !input_files.is_empty() {
181+
sh_warn!(
182+
"unable to lint. Solar only supports Solidity versions prior to 0.8.0"
183+
)?;
184+
}
181185
return Ok(());
182186
}
183187

0 commit comments

Comments
 (0)