Skip to content

Commit

Permalink
Fix issue with setting the default output file
Browse files Browse the repository at this point in the history
  • Loading branch information
prsabahrami committed Nov 27, 2024
1 parent 407c1cb commit 71058b6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ enum Commands {
},
}

fn default_output_file(create_executable: bool) -> PathBuf {
fn default_output_file(platform: Platform, create_executable: bool) -> PathBuf {
if create_executable {
if cfg!(target_os = "windows") {
if platform.is_windows() {
cwd().join("environment.ps1")
} else {
cwd().join("environment.sh")
Expand Down Expand Up @@ -127,7 +127,8 @@ async fn main() -> Result<()> {
ignore_pypi_errors,
create_executable,
} => {
let output_file = output_file.unwrap_or_else(|| default_output_file(create_executable));
let output_file =
output_file.unwrap_or_else(|| default_output_file(platform, create_executable));

let options = PackOptions {
environment,
Expand Down

0 comments on commit 71058b6

Please sign in to comment.