gethome() moved back to vpkConf module.

This commit is contained in:
Norayr Chilingarian 2020-05-08 14:06:06 +04:00
parent 296803f7f5
commit 7a741b509a
2 changed files with 10 additions and 10 deletions

View file

@ -4,7 +4,15 @@ IMPORT Out, Files, Strings, Platform,
VAR
conf, confDir : ARRAY 256 OF CHAR;
PROCEDURE getHome(VAR path: ARRAY OF CHAR);
BEGIN
IF ~(Platform.getEnv("HOME", path)) THEN
Out.String("HOME variable is not found"); Out.Ln;
HALT(1);
END;
END getHome;
PROCEDURE mkConfContent(VAR path: ARRAY OF CHAR);
BEGIN
Strings.Append('{"path" : "', path);
@ -40,7 +48,7 @@ PROCEDURE setConfPath;
VAR
home: ARRAY 128 OF CHAR;
BEGIN
vpkSettings.getHome(home);
getHome(home);
mkConfDirPath(home, confDir);
conf := confDir;
Strings.Append("/", conf);

View file

@ -13,12 +13,4 @@ CONST
port* = "80";
installPath* = "dependencies";
PROCEDURE getHome*(VAR path: ARRAY OF CHAR);
BEGIN
IF ~(Platform.getEnv("HOME", path)) THEN
Out.String("HOME variable is not found"); Out.Ln;
HALT(1);
END;
END getHome;
END vpkSettings.