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

fix(dgw): resolve web frontend on Linux #772

Merged
merged 1 commit into from
Mar 14, 2024
Merged
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
17 changes: 13 additions & 4 deletions devolutions-gateway/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,19 @@ impl WebAppConf {
} else if let Some(path) = &value.static_root_path {
path.as_std_path().to_owned()
} else {
let mut exe_path = std::env::current_exe().context("failed to find service executable location")?;
exe_path.pop();
exe_path.push("webapp");
exe_path
if cfg!(target_os = "windows") {
let mut exe_path = std::env::current_exe().context("failed to find service executable location")?;
exe_path.pop();
exe_path.push("webapp");
exe_path
} else if cfg!(target_os = "linux") {
let mut root_path = std::path::PathBuf::from("/usr/share");
root_path.push(APPLICATION_DIR);
root_path.push("webapp");
root_path
} else {
anyhow::bail!("standalone web application path should be specified manually on this platform");
}
};

let conf = Self {
Expand Down
Loading