You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error occurred when executing task 'Default'.
Error: System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Cake.Core.IO.Globbing.GlobParser.ParseSegment(GlobParserContext context)
at Cake.Core.IO.Globbing.GlobParser.Parse(GlobParserContext context)
at Cake.Core.IO.Globber.Match(String pattern, Func`2 predicate)
at Cake.Common.IO.GlobbingAliases.GetDirectories(ICakeContext context, String pattern)
at Cake.Common.IO.DirectoryAliases.CleanDirectories(ICakeContext context, String pattern)
at Submission#0.CleanDirectories(String pattern)
at Submission#0.<<Initialize>>b__0_0()
at Cake.Core.ActionTask.Execute(ICakeContext context)
at Cake.Core.DefaultExecutionStrategy.Execute(CakeTask task, ICakeContext context)
at Cake.Core.CakeEngine.ExecuteTask(ICakeContext context, IExecutionStrategy strategy, Stopwatch stopWatch, CakeTask task, CakeReport report)
at Cake.Core.CakeEngine.RunTarget(ICakeContext context, IExecutionStrategy strategy, String target)
at Cake.Scripting.BuildScriptHost.RunTarget(String target)
at Submission#0.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.<RunSubmissionsAsync>d__9`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Scripting.Script`1.<RunSubmissionsAsync>d__21.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Cake.Scripting.Roslyn.RoslynScriptSession.Execute(Script script)
at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)
at Cake.Commands.BuildCommand.Execute(CakeOptions options)
at Cake.CakeApplication.Run(CakeOptions options)
at Cake.Program.Main()
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
at Cake.Core.IO.Globbing.GlobParser.ParseSegment(GlobParserContext context)
at Cake.Core.IO.Globbing.GlobParser.Parse(GlobParserContext context)
at Cake.Core.IO.Globber.Match(String pattern, Func`2 predicate)
at Cake.Common.IO.GlobbingAliases.GetDirectories(ICakeContext context, String pattern)
at Cake.Common.IO.DirectoryAliases.CleanDirectories(ICakeContext context, String pattern)
at Submission#0.CleanDirectories(String pattern)
at Submission#0.<<Initialize>>b__0_0()
at Cake.Core.ActionTask.Execute(ICakeContext context)
at Cake.Core.DefaultExecutionStrategy.Execute(CakeTask task, ICakeContext context)
at Cake.Core.CakeEngine.ExecuteTask(ICakeContext context, IExecutionStrategy strategy, Stopwatch stopWatch, CakeTask task, CakeReport report)
at Cake.Core.CakeEngine.RunTarget(ICakeContext context, IExecutionStrategy strategy, String target)
at Cake.Scripting.BuildScriptHost.RunTarget(String target)
at Submission#0.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.<RunSubmissionsAsync>d__9`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Scripting.Script`1.<RunSubmissionsAsync>d__21.MoveNext()<---
The text was updated successfully, but these errors were encountered:
What You Are Seeing?
When calling CleanDirectories() with an invalid Glob pattern (in this case a trailing slash), a NullReferenceException is thrown.
What is Expected?
The method should behave the same as unable to locate the directory.
What version of Cake are you using?
0.22.2
Are you running on a 32 or 64 bit system?
64 bit
What environment are you running on? Windows? Linux? Mac?
Windows
Are you running on a CI Server? If so, which one?
No
How Did You Get This To Happen? (Steps to Reproduce)
Run the following cake script
Output Log
The text was updated successfully, but these errors were encountered: