mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 18:25:40 +02:00
[448400] [dstore] automatically fallback to exec(hostname) if no
hostname detected and print message if needed
This commit is contained in:
parent
0103923695
commit
d74dc7aaf8
1 changed files with 1 additions and 0 deletions
|
@ -96,6 +96,7 @@ public class ServerAttributes extends DataStoreAttributes
|
||||||
}
|
}
|
||||||
if (hostname == null){
|
if (hostname == null){
|
||||||
// fall back to reading hostname from shell
|
// fall back to reading hostname from shell
|
||||||
|
System.err.println("The server can not resolve the hostname so falling back to reading hostname from the console.");
|
||||||
try {
|
try {
|
||||||
Process p = Runtime.getRuntime().exec("hostname"); //$NON-NLS-1$
|
Process p = Runtime.getRuntime().exec("hostname"); //$NON-NLS-1$
|
||||||
InputStream inStream = p.getInputStream();
|
InputStream inStream = p.getInputStream();
|
||||||
|
|
Loading…
Add table
Reference in a new issue