Skip to content
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

Feature/prefix location file #422

Merged
merged 11 commits into from
Oct 31, 2023

Conversation

ruben-arts
Copy link
Contributor

No description provided.

@ruben-arts ruben-arts marked this pull request as draft October 28, 2023 12:45
@ruben-arts ruben-arts marked this pull request as ready for review October 30, 2023 13:21
Comment on lines 46 to 61
Ok(p) => {
if prefix_file.starts_with(&p) {
Ok(())
} else {
Err(miette::miette!(
"The project location seems to be change from `{}` to `{}`, this is not allowed.\
\nPlease remove the `{}` folder and run again",
p,
prefix_file
.parent()
.expect("prefix_file should always be a file")
.display(),
consts::PIXI_DIR
))
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Ok(p) => {
if prefix_file.starts_with(&p) {
Ok(())
} else {
Err(miette::miette!(
"The project location seems to be change from `{}` to `{}`, this is not allowed.\
\nPlease remove the `{}` folder and run again",
p,
prefix_file
.parent()
.expect("prefix_file should always be a file")
.display(),
consts::PIXI_DIR
))
}
}
Ok(p) if prefix_file.starts_with(&p) => Ok(()),
Ok(p) => {
Err(miette::miette!(
"The project location seems to be change from `{}` to `{}`, this is not allowed.\
\nPlease remove the `{}` folder and run again",
p,
prefix_file
.parent()
.expect("prefix_file should always be a file")
.display(),
consts::PIXI_DIR
))
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually added this.

src/environment.rs Outdated Show resolved Hide resolved
src/environment.rs Outdated Show resolved Hide resolved
src/environment.rs Outdated Show resolved Hide resolved
src/environment.rs Outdated Show resolved Hide resolved
src/environment.rs Outdated Show resolved Hide resolved
src/environment.rs Outdated Show resolved Hide resolved
src/environment.rs Outdated Show resolved Hide resolved
src/environment.rs Outdated Show resolved Hide resolved
@ruben-arts
Copy link
Contributor Author

Lol, that could have been handled better @github !

@ruben-arts ruben-arts merged commit bb261d8 into prefix-dev:main Oct 31, 2023
8 of 9 checks passed
@ruben-arts ruben-arts deleted the feature/prefix_location_file branch October 31, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants