Skip to content
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

service: ensure environment variables are strings #11427

Merged
merged 1 commit into from May 26, 2021

Conversation

SMillerDev
Copy link
Member

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

@BrewTestBot
Copy link
Member

Review period will end on 2021-05-25 at 00:00:00 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label May 22, 2021
dawidd6
dawidd6 previously approved these changes May 22, 2021
@Bo98
Copy link
Member

Bo98 commented May 24, 2021

Can you mention what issue this is solving (here, not in code)? Not entirely sure what error this was causing before.

@SMillerDev
Copy link
Member Author

The issue is represented in the test block. If you used a pathname in a variable it would render in the plist as "data" instead of the path as a string.

@Bo98
Copy link
Member

Bo98 commented May 24, 2021

Oh right, I see we do StandardOutPath etc string conversion earlier. That's what confused me - I thought it was dealing with Pathname fine there.

@Bo98
Copy link
Member

Bo98 commented May 24, 2021

Would it make sense to do @environment_variables = variables.transform_values(&:to_s) on line 108 instead, for consistency? Doesn't really matter much though.

@SMillerDev
Copy link
Member Author

I think we can

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label May 25, 2021
@BrewTestBot
Copy link
Member

Review period ended.

BrewTestBot
BrewTestBot previously approved these changes May 25, 2021
@SMillerDev SMillerDev dismissed stale reviews from BrewTestBot and dawidd6 via 1ccbd24 May 25, 2021 10:04
@SMillerDev SMillerDev requested a review from Bo98 May 25, 2021 10:05
BrewTestBot
BrewTestBot previously approved these changes May 25, 2021
@SMillerDev
Copy link
Member Author

Typecheck is not happy and I'm not sure why

@Bo98
Copy link
Member

Bo98 commented May 25, 2021

Seems to think it could be nil here but it can’t. Could make wrap it as T.must(variables).transform_values(...

@SMillerDev
Copy link
Member Author

Seems to think it could be nil here but it can’t. Could make wrap it as T.must(variables).transform_values(...

I think this class has equal parts Sorbet and normal code... Okay, I'll try. I have to rebase anyway

@SMillerDev
Copy link
Member Author

Since it hash an empty hash as fallback I guess it simply can't be null

@SMillerDev SMillerDev merged commit 926411f into Homebrew:master May 26, 2021
@github-actions github-actions bot added the outdated PR was locked due to age label Jun 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2021
@SMillerDev SMillerDev deleted the fix/service/variables_to_s branch September 21, 2022 13:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants