For testing purposes it will come handy to change the directory from a
batch-mode script. Remove the check forbidding use of the 'cd' command
in batch mode.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
for the ``cd`` command is the home directory or, if there is no *HOME*
variable in the environment, the root directory.
-This command is only available in interactive mode.
-
pwd
---
const char *dir = NULL;
g_autofree char *dir_malloced = NULL;
- if (!ctl->imode) {
- vshError(ctl, "%s", _("cd: command valid only in interactive mode"));
- return false;
- }
-
if (vshCommandOptStringQuiet(ctl, cmd, "dir", &dir) <= 0)
dir = dir_malloced = virGetUserDirectory();
if (!dir)