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.
2 parents 8da5fe3 + 280ddf1 commit 5c74dc5Copy full SHA for 5c74dc5
src/Common/Commands.Common/AzurePSCmdlet.cs
@@ -25,6 +25,7 @@
25
using System.IO;
26
using System.Management.Automation.Host;
27
using System.Text;
28
+using System.Linq;
29
using System.Threading;
30
31
namespace Microsoft.WindowsAzure.Commands.Utilities.Common
@@ -160,7 +161,10 @@ public static bool IsDataCollectionAllowed()
160
161
protected bool CheckIfInteractive()
162
{
163
bool interactive = true;
- if (this.Host == null || this.Host.UI == null || this.Host.UI.RawUI == null)
164
+ if (this.Host == null ||
165
+ this.Host.UI == null ||
166
+ this.Host.UI.RawUI == null ||
167
+ Environment.GetCommandLineArgs().Any(s => s.Equals("-NonInteractive", StringComparison.OrdinalIgnoreCase)))
168
169
interactive = false;
170
}
0 commit comments