Hello Dave,
I noticed that
Shell::EnvImporter->new(shell => "zsh", command => "my_command",
debuglevel => 9);
does not work fine when my command writes some empty lines ("\n") on its
stdout. As an example, let's suppose that my command writes the 5
following lines on its stdout:
*Warning* Cycle.log files could not be used
Setting variables for main cycle
/farequote/IntegrationK/OTFGenData/setPSCacheLinux was sourced
succesfully for FqA database
In this situation, the while loop on line 274 of file
Shell/EnvImporter/Shell.pm exits on the first blank line of my command's
stdout, therefore the end of the command's stdout is not parsed and its
status not captured. The next while loop (line 291 of file
Shell/EnvImporter/Shell.pm) behaves the same, and the new environment
variable values are not imported.
I guess it would be better to replace the following instruction:
while (my $line = shift(@lines)) {
on lines 257, 274 and 291 of file Shell/EnvImporter/Shell.pm with some
instructions like:
while (@lines) {
my $line = shift(@lines);
Have a nice day,
Best Regards,
Gwenaelle