Skip to content

Commit 5fff2f4

Browse files
committed
fix: .service file error at line 12 for custom interpreters
Trim newline character from interpreter path
1 parent 9d4ae82 commit 5fff2f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/handlers/handle_create_service.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ async fn create_service_file(
164164
env::var("SUDO_USER").expect("Must be in sudo mode. ENV variable $SUDO_USER not found");
165165
let mut exec_start = match interpreter {
166166
Some(interpreter) => {
167-
let interpreter_path = find_binary_path(&interpreter, &user).await.unwrap();
167+
let interpreter_path = find_binary_path(&interpreter, &user).await.unwrap()
168+
.trim_end_matches("\n").to_string();
169+
168170
println!("got path {}", interpreter_path);
169171

170172
format!("{} {}", interpreter_path, file_name)

0 commit comments

Comments
 (0)