PSFLowChart icon indicating copy to clipboard operation
PSFLowChart copied to clipboard

Erreur en utilisant -DescriptionAsLabel

Open LaurentLienhard opened this issue 5 years ago • 6 comments

Salut,

en testant avec le parameter -DescriptionAsLabel j'ai cette erreur : Line | 1320 | $plop = [scriptblock]::Create($s).invoke() | ^ Exception calling "Create" with "1" argument(s): "At line:2 char:106 + … attributes @{Label='If ( | $MyInvocation.ScriptName -notLike '*Invoke-B … + | ~ You must provide a value expression following the '*' operator. At line:2 char:106 + … If ( | $MyInvocation.ScriptName -notLike '*Invoke-Build.ps1' )';shape=' … + | ~~~~~~~~~~~~~~~~~~~~ Unexpected token 'Invoke-Build.ps1' )'' in expression or statement. At line:2 char:58 + | ;node 0881e777-387f-4437-8cfc-a4fbe75d4285 -attributes @{Label='If ( … + | ~ Missing closing '}' in statement block or type definition. At line:2 char:142 + … n.ScriptName -notLike | '*Invoke-Build.ps1' )';shape='diamond'};node En … + | ~ Unexpected token '}' in expression or statement. At line:3 char:674 + … $RequiredModulesDirectory -in | @('CurrentUser', 'AllUsers') )';shape=' … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Unexpected token 'CurrentUser', 'AllUsers') )'' in expression or statement. At line:3 char:619 + … =''};node | e4530674-0868-4ee4-b9c0-20a0220a0a12 -attributes @{Label='E … + | ~ Missing closing '}' in statement block or type definition. At line:3 char:711 + … odulesDirectory -in | @('CurrentUser', 'AllUsers') )';shape=''};Edge -f … + | ~ Unexpected token '}' in expression or statement. At line:3 char:3500 + … ( $RequiredModulesDirectory -notIn | @('CurrentUser', 'AllUsers') -and + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Unexpected token 'CurrentUser', 'AllUsers') -and (($Env:PSModulePath -split | [io.path]::PathSeparator) -notContains $RequiredModulesDirectory) )'' in expression or statement. At line:3 | char:3452 + … e15;;node 857d0a6c-6b76-4879-83a2-6d2ac31e8e15 -attributes @{Label='I … + | ~ Missing closing '}' in statement block or type definition. At line:4 char:124 + … ) -notContains | $RequiredModulesDirectory) )';shape='diamond'};node En … + | ~ Unexpected token '}' in expression or statement. Not all parse errors were reported. Correct the reported | errors and try again."

j'ai fais le test sur un fichier build.ps1 de @GaelColas => Lien

LaurentLienhard avatar Nov 16 '19 18:11 LaurentLienhard

merde j'arrive plus reproduire l'erreur pour te donner exactement les lignes de commandes que j'ai faites ;-)

LaurentLienhard avatar Nov 16 '19 18:11 LaurentLienhard

voila j'ai fait $a = Find-FCNode -File .\build.ps1 -FindDescription -Verbose New-FCGraph -Node $a -Name Buildgraph -DescriptionAsLabel

LaurentLienhard avatar Nov 16 '19 18:11 LaurentLienhard

Ah ok je vois, il faut que j echappe l etoile.. ça devrait être vite réglé !

LxLeChat avatar Nov 16 '19 19:11 LxLeChat

Ok @LaurentLienhard j'ai corrigé tu peux rester! en revanche, dans ce cas, si tu utilise -descriptionaslabel, tu verras qu'il n y a rien dans les noeuds (sauf si toi même tu ajoutes des descriptions, check le readme pour voir comment faire, ce sont des simples commentaires qu'il faut mettre sous chaque statement avec cette forme: # Description: ma description )

c 'est bien *dans un des ifs qui posait problème, du coup je le remplace par rien ... tet pas la meilleur solution d'ailleurs ! j'ai rebuild mais uniquement sur le repo, pas pousser de version sur la psgallery.

LxLeChat avatar Nov 16 '19 22:11 LxLeChat

bon en faisant comme ca c'est ok Find-FCNode -File .\build.ps1 -FindDescription -Verbose | New-FCGraph Par contre comme ca chez moi toujours l'erreur $a = Find-FCNode -File .\build.ps1 -FindDescription -Verbose

New-FCGraph -Node $a -Name Buildgraph -DescriptionAsLabel

peut-être un souci liè a ma machine

LaurentLienhard avatar Nov 17 '19 15:11 LaurentLienhard

je peux fermer ?

LxLeChat avatar Nov 19 '19 12:11 LxLeChat