Skip to content

Commit

Permalink
Merge pull request #3058 from PecanProject/fqdn2
Browse files Browse the repository at this point in the history
find fqdn across platforms
  • Loading branch information
robkooper committed Oct 21, 2022
2 parents b419bf0 + 410ed77 commit 0ff670e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ convert data for a single PFT fixed (#1329, #2974, #2981)
- Added an updated ED2IN template file, `models/ed/inst/ED2IN.r2.2.0.github`, to reflect new variables in the development version of ED2
- `PEcAn.data.land::gSSURGO.Query` has been updated to work again after changes to the gSSURGO API.
- `PEcAn.settings::read.settings()` now prints a warning when falling back on default `"pecan.xml"` if the named `inputfile` doesn't exist.
- fqdn() can access hostname on Windows (#3044 fixed by #3058)

### Changed

Expand Down
7 changes: 4 additions & 3 deletions base/remote/R/fqdn.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
##' @examples
##' fqdn()
fqdn <- function() {
if (Sys.getenv("FQDN") != "") {
Sys.getenv("FQDN")
if (Sys.getenv("FQDN") == "") {
fqdn <- as.character(Sys.info()["nodename"])
} else {
system2("hostname", "-f", stdout = TRUE)
fqdn <- Sys.getenv("FQDN")
}
return(fqdn)
} # fqdn

0 comments on commit 0ff670e

Please sign in to comment.