-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lingo Clean #63
base: main
Are you sure you want to change the base?
Lingo Clean #63
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ use crate::package::{ | |
OUTPUT_DIRECTORY, | ||
}; | ||
use crate::util::errors::{AnyError, BuildResult, LingoError}; | ||
use crate::{GitCloneAndCheckoutCap, WhichCapability}; | ||
use crate::{GitCloneAndCheckoutCap, RemoveFolderCap, WhichCapability}; | ||
|
||
pub mod cmake_c; | ||
pub mod cmake_cpp; | ||
|
@@ -25,6 +25,7 @@ pub fn execute_command<'a>( | |
config: &'a mut Config, | ||
which: WhichCapability, | ||
clone: GitCloneAndCheckoutCap, | ||
remove_dir_all: RemoveFolderCap, | ||
) -> BatchBuildResults<'a> { | ||
let mut result = BatchBuildResults::new(); | ||
let dependencies = Vec::from_iter(config.dependencies.clone()); | ||
|
@@ -54,6 +55,12 @@ pub fn execute_command<'a>( | |
} | ||
} | ||
} | ||
CommandSpec::Clean => { | ||
let output_root = &config.apps[0].output_root; | ||
if let Err(e) = remove_dir_all(&output_root.display().to_string()) { | ||
error!("lingo was unable to delete build folder! {e}"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More or less the same error message is produced by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But it seems like the error is: "lingo was unable to delete build folder! Could not delete folder: ..." which seems a little redundant |
||
} | ||
} | ||
_ => {} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also remove
Lingo.toml
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no