Fix win compile issue (#1180)
This commit is contained in:
@@ -5,6 +5,7 @@ use nix::{
|
||||
unistd::{Pid, getpgid},
|
||||
};
|
||||
use services::services::container::ContainerError;
|
||||
#[cfg(unix)]
|
||||
use tokio::time::Duration;
|
||||
|
||||
pub async fn kill_process_group(child: &mut AsyncGroupChild) -> Result<(), ContainerError> {
|
||||
|
||||
@@ -3,9 +3,11 @@ use db::models::{
|
||||
task_attempt::{TaskAttempt, TaskAttemptError},
|
||||
};
|
||||
use deployment::Deployment;
|
||||
use executors::actions::ExecutorAction;
|
||||
#[cfg(unix)]
|
||||
use executors::{
|
||||
actions::{
|
||||
ExecutorAction, ExecutorActionType,
|
||||
ExecutorActionType,
|
||||
script::{ScriptContext, ScriptRequest, ScriptRequestLanguage},
|
||||
},
|
||||
executors::cursor::CursorAgent,
|
||||
@@ -50,7 +52,7 @@ pub async fn run_cursor_setup(
|
||||
}
|
||||
|
||||
async fn get_setup_helper_action() -> Result<ExecutorAction, ApiError> {
|
||||
#[cfg(not(windows))]
|
||||
#[cfg(unix)]
|
||||
{
|
||||
let base_command = CursorAgent::base_command();
|
||||
// First action: Install
|
||||
@@ -91,9 +93,9 @@ fi
|
||||
))
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[cfg(not(unix))]
|
||||
{
|
||||
use executors::executors::ExecutorError::SetupHelperNotSupported;
|
||||
Err(ApiError::Executor(ExecutorError::SetupHelperNotSupported))
|
||||
Err(ApiError::Executor(SetupHelperNotSupported))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ use std::{
|
||||
env::{join_paths, split_paths},
|
||||
ffi::{OsStr, OsString},
|
||||
path::{Path, PathBuf},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use crate::tokio::block_on;
|
||||
@@ -117,6 +116,8 @@ async fn which(executable: &str) -> Option<PathBuf> {
|
||||
|
||||
#[cfg(not(windows))]
|
||||
async fn get_fresh_path() -> Option<String> {
|
||||
use std::time::Duration;
|
||||
|
||||
use tokio::process::Command;
|
||||
|
||||
async fn run(shell: &Path, login: bool) -> Option<String> {
|
||||
|
||||
Reference in New Issue
Block a user