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

normalize all paths #17

Merged
merged 3 commits into from
Jun 5, 2024
Merged

normalize all paths #17

merged 3 commits into from
Jun 5, 2024

Conversation

DonJayamanne
Copy link
Collaborator

No description provided.

@@ -3,7 +3,7 @@

use crate::env_variables::EnvVariables;
use log::trace;
use pet_utils::path::fix_file_path_casing;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rename to make the new intent clear

if let Ok(resolved) = fs::canonicalize(&path) {
// Return the path as is.
if cfg!(unix) {
return resolved;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Return the normalized paths even for linux (this is the main change)


#[cfg(unix)]
#[test]
fn read_environment_txt() {
use common::{create_env_variables, resolve_test_path};
use pet_conda::environment_locations::get_conda_envs_from_environment_txt;
use std::path::PathBuf;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also fixed some linter warnings

@DonJayamanne DonJayamanne marked this pull request as ready for review June 5, 2024 22:15
@DonJayamanne DonJayamanne enabled auto-merge (squash) June 5, 2024 22:26
@DonJayamanne DonJayamanne merged commit 4ef5a03 into main Jun 5, 2024
24 checks passed
@DonJayamanne DonJayamanne deleted the normalizePaths2 branch June 5, 2024 22:28
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