We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b0bf41 commit 09abdc8Copy full SHA for 09abdc8
src/PowerShellEditorServices/Language/FindDotSourcedVisitor.cs
@@ -32,7 +32,8 @@ public FindDotSourcedVisitor()
32
/// or a decision to continue if it wasn't found</returns>
33
public override AstVisitAction VisitCommand(CommandAst commandAst)
34
{
35
- if (commandAst.InvocationOperator.Equals(TokenKind.Dot))
+ if (commandAst.InvocationOperator.Equals(TokenKind.Dot) &&
36
+ commandAst.CommandElements[0] is StringConstantExpressionAst)
37
38
// Strip any quote characters off of the string
39
string fileName = commandAst.CommandElements[0].Extent.Text.Trim('\'', '"');
0 commit comments