Skip to content

Commit

Permalink
Fixed config verification in IDEs with 'copy_target' feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Razz4780 committed Dec 5, 2023
1 parent 483f818 commit c80b254
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/+fix-verification.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed config verification in IDE context when `copy_target` feature is used.
2 changes: 1 addition & 1 deletion mirrord/config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub type Result<T, E = ConfigError> = std::result::Result<T, E>;
/// Struct used for storing context during building of configuration.
#[derive(Default)]
pub struct ConfigContext {
/// Are we in a IDE context?
/// Are we in an IDE context?
///
/// Used by `Config::verify` to change some errors into warnings.
pub ide: bool,
Expand Down
3 changes: 2 additions & 1 deletion mirrord/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ impl LayerConfig {
));
}

if self.target.path.is_none() {
// Target may also be set later in the UI.
if self.target.path.is_none() && !context.ide {
return Err(ConfigError::Conflict(
"The copy target feature is not compatible with a targetless agent, \
please either disable this option or specify a target."
Expand Down

0 comments on commit c80b254

Please sign in to comment.