Skip to content

Unwanted output during alr printenv caused by actions #989

@pjljvandelaar

Description

@pjljvandelaar

Dear Alire Developers,

alr help printenv
yields

SUMMARY
   Print the build environment variables

USAGE
   alr printenv [options]

OPTIONS
   --details     Print details about the environment variables and their origin
   --unix        Use a UNIX shell format for the export (default)
   --powershell  Use a Windows PowerShell format for the export
   --wincmd      Use a Windows CMD shell format for the export

GLOBAL OPTIONS
   -c (--config=ARG)       Override configuration folder location
   -f (--force)            Keep going after a recoverable troublesome situation
   -h (--help)             Display general or command-specific help
   -n (--non-interactive)  Assume default answers for all user prompts
   --no-color              Disables colors in output
   --no-tty                Disables control characters in output
   --prefer-oldest         Prefer oldest versions instead of newest when resolving dependencies
   -q                      Limit output to errors
   -v                      Be more verbose (use twice for extra detail)
   -d (--debug[])          Enable debug-specific log messages

DESCRIPTION
   Print the environment variables used to build the crate. This command can be
   used to setup a build environment, for instance before starting an IDE.

   Examples:
     - eval $(alr printenv --unix)
     - alr printenv --powershell | Invoke-Expression

Although the last example is really helpful.
It doesn't always work flawless

PS C:\path\to\Renaissance-Ada\src\tools\Code_Reviewer>  alr printenv --powershell | Invoke-Expression
Note: : The term 'Note:' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Note: Synchronizing workspace...
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (Note::String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Dependencies : The term 'Dependencies' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Dependencies automatically updated as follows:
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Dependencies:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Invoke-Expression : Cannot bind argument to parameter 'Command' because it is an empty string.
At line:1 char:30
+  alr printenv --powershell | Invoke-Expression
+                              ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:PSObject) [Invoke-Expression], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.InvokeExpressionCommand

warn: Generating possibly incomplete environment because of missing dependencies
New : The term 'New' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:4
+    New solution is incomplete.
+    ~~~
    + CategoryInfo          : ObjectNotFound: (New:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Invoke-Expression : At line:1 char:5
+    +i gnat            11.2.4  (new,installed,gnat_native,indirect)
+     ~
Missing expression after unary operator '+'.
At line:1 char:5
+    +i gnat            11.2.4  (new,installed,gnat_native,indirect)
+     ~
Unexpected token 'i' in expression or statement.
At line:1 char:35
+    +i gnat            11.2.4  (new,installed,gnat_native,indirect)
+                                   ~
Missing argument in parameter list.
At line:1 char:30
+  alr printenv --powershell | Invoke-Expression
+                              ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ParserError: (:) [Invoke-Expression], ParseException
    + FullyQualifiedErrorId : MissingExpressionAfterOperator,Microsoft.PowerShell.Commands.InvokeExpressionCommand

This happens when alire is executed for the first time on a project / directory and other output to report progress is also provided.

Hopes this helps to make alire even better!

Pierre

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Area

None yet

OS

None yet

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions