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

chore: fix windows specific script errors #5051

Merged
merged 3 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/biome_cli/src/service/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async fn try_connect() -> io::Result<NamedPipeClient> {

/// Process creation flag from the Win32 API, ensures the process is created
/// in its own group and will not be killed when the parent process exits
const CREATE_NEW_PROCESS_GROUP: u32 = 0x00000200;
const CREATE_NEW_PROCESS_GROUP: u32 = 0x0000_0200;

/// Spawn the daemon server process in the background
fn spawn_daemon(
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_cli/tests/commands/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ fn fs_error_infinite_symlink_expansion_to_dirs() {

#[cfg(target_os = "windows")]
{
check_windows_symlink!(symlink_dir(&subdir2_path, &subdir1_path.join("symlink1")));
check_windows_symlink!(symlink_dir(&subdir2_path, subdir1_path.join("symlink1")));
check_windows_symlink!(symlink_dir(subdir1_path, subdir2_path.join("symlink2")));
}

Expand Down
2 changes: 2 additions & 0 deletions crates/biome_cli/tests/commands/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,12 @@ const APPLY_ATTRIBUTE_POSITION_AFTER: &str = r#"<Foo
</Foo>;
"#;

#[cfg(not(windows))]
const DEFAULT_CONFIGURATION_BEFORE: &str = r#"function f() {
return { a, b }
}"#;

#[cfg(not(windows))]
const DEFAULT_CONFIGURATION_AFTER: &str = "function f() {
return { a, b };
}
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_cli/tests/commands/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ fn fs_error_infinite_symlink_expansion_to_dirs() {

#[cfg(target_os = "windows")]
{
check_windows_symlink!(symlink_dir(&subdir2_path, &subdir1_path.join("symlink1")));
check_windows_symlink!(symlink_dir(&subdir2_path, subdir1_path.join("symlink1")));
check_windows_symlink!(symlink_dir(subdir1_path, subdir2_path.join("symlink2")));
}

Expand Down
3 changes: 2 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ _touch file:

[windows]
_touch file:
(gci {{file}}).LastWriteTime = Get-Date
powershell -Command "(Get-Item {{file}}).LastWriteTime = Get-Date"


# Run tests of all crates
test:
Expand Down