-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Update SwiftLint plugin to use environment
property on Process
#207
Update SwiftLint plugin to use environment
property on Process
#207
Conversation
This was failing when the system shell is fish. Using the `environment` property on `Process` makes this shell-agnostic
import Logger | ||
@testable import RunnerLib | ||
import XCTest |
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.
These changes seem to have been done during the pre-commit hook
@@ -42,6 +42,13 @@ extension DangerfilePathFinderTests { | |||
] | |||
} | |||
|
|||
extension GetDangerJSPathTests { |
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.
These changes seem to have been done during the pre-commit hook
This was working locally but isn't in CI. Will fix! |
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.
Looks good can you please update the changelog?
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.
Looks there are some problems with CI on linux
Thanks! I've updated the changelog with the change |
I can't immediately see what's going wrong here, I'll look in to it further |
Maybe these were causing the linux builds to fail on CI? The reason isn’t obvious to me
This was done during the pre-commit hook but didn’t seem to be committed
This is very weird:
|
Could it be related to the env override? Maybe it has to be merged with the current process env? |
Ok fixed! 🎉 |
Ah I hadn't thought of this, good catch! I should have a chance to clean this up tonight/tomorrow. Thanks for the fix 😄 |
This file is in a cycle of changes, I think thanks to SwiftLint It seems to want to end with a new line, but also not start with whitespace. This comment both explains the file and fixes the SwiftLint issue
Generated by 🚫 Danger Swift against ebb5189 |
arguments.joined(separator: " ")].filter { !$0.isEmpty }.joined(separator: " ") | ||
print("Executing \(script)") | ||
print("Executing `\(script)` with environment variables \(environmentVariables)") |
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.
@f-meloni this was here before, but I have updated it to include the environment variables now.
Should I remove this or keep it?
If I keep I'll update it to print the merged envs and also add it to the spawn
function below?
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.
Yes, I like it :)
`print` statement was also removed. This may we re-added in response to https://github.com/danger/swift/pull/207/files#r263776454
@@ -0,0 +1 @@ | |||
// An empty file to allow the DangerDependencies target to build via SPM |
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.
Thanks :)
merge on green |
This was failing when the system shell is fish (because fish requires
env
to be prepended). Using theenvironment
property onProcess
makes this shell-agnostic