-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed error action and added example scripts #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 8 files at r1.
Reviewable status: 4 of 8 files reviewed, 1 unresolved discussion (waiting on @rchristman89)
source/Examples/Resources/PostgreSqlScript/TestSqlFiles/test.sql, line 20 at r1 (raw file):
BEGIN IF NOT exists (SELECT * FROM information_schema.tables Where table_schema = 'public' AND table_name = 'Users') THEN RAISE INFO 'hi';
Should Probably change this message from 'hi'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 8 files at r1.
Reviewable status: 7 of 8 files reviewed, 1 unresolved discussion (waiting on @rchristman89)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one thought on the using Start-Process
@@ -125,14 +128,14 @@ function Set-TargetResource | |||
Write-Verbose -Message ($script:localizedData.CreatingDatabase -f $DatabaseName) | |||
Invoke-Command -ScriptBlock { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any benefit to using Start-Process here? When calling an .exe from PowerShell I like to use Start-Process -Wait so ensure the script will not progress until the .exe is finished. I have found in the past that PowerShell will call the .exe and then keep on going. This would also allow you to inspect the exitCode to verify success. It might also remove the requirement to change the built-in variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can try it and see how it goes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 6 of 8 files reviewed, 2 unresolved discussions (waiting on @jcwalker and @themitchk)
source/DSCResources/DSC_PostgreSqlDatabase/DSC_PostgreSqlDatabase.psm1, line 129 at r1 (raw file):
Previously, rchristman89 (Ryan Christman) wrote…
We can try it and see how it goes.
Done.
source/Examples/Resources/PostgreSqlScript/TestSqlFiles/test.sql, line 20 at r1 (raw file):
Previously, themitchk wrote…
Should Probably change this message from 'hi'.
Done.
Pull Request (PR) description
Fixing the output causing Test in SqlScript to not report back errors.
Task list
build.ps1 -ResolveDependency
).and comment-based help.
This change is