这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@yamadayutaka
Copy link
Contributor

Add USERPROFILE, HOMEDRIVE, and HOMEPATH to the built-in environment variables pass-through list to ensure proper path resolution in Windows environments.

Description

Resolves #10587

When running AWS SAM CLI from tasks, the following error occurs because profiles cannot be referenced:

Error: The config profile (default) could not be found

This happens because Python's os.path module references environment variables such as USERPROFILE, HOMEDRIVE, and HOMEPATH to obtain user paths in Windows environments, but these variables are not included in the default pass-through list, making them inaccessible within tasks.

https://github.com/python/cpython/blob/f4911258a80409cb641f13578137475204ab43b5/Lib/ntpath.py#L360-L366

Since these are standard Windows environment variables, I propose adding them to the default pass-through list.

Testing Instructions

Add an AWS SAM project to a Turborepo child project, configure a script with the --profile option, and run it as a task.

Add USERPROFILE, HOMEDRIVE, and HOMEPATH to the built-in environment
variables pass-through list to ensure proper path resolution in Windows environments.
@vercel
Copy link
Contributor

vercel bot commented Jun 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2025 11:35am
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2025 11:35am
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2025 11:35am
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2025 11:35am
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2025 11:35am
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2025 11:35am
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2025 11:35am
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2025 11:35am
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2025 11:35am
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2025 11:35am

@vercel
Copy link
Contributor

vercel bot commented Jun 21, 2025

@yamadayutaka is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@anthonyshew anthonyshew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thank you!

@anthonyshew
Copy link
Contributor

anthonyshew commented Jun 21, 2025

Formatting issue existed before this PR and fixed in #10589.

@anthonyshew anthonyshew merged commit 56d10f3 into vercel:main Jun 21, 2025
38 of 39 checks passed
@yamadayutaka
Copy link
Contributor Author

Thank you for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profile reference fails when running AWS SAM CLI in scripts executed by tasks on Windows environment

2 participants