Bug: option --base-dir does not work
Description:
--base-dir does not apply the given directory to relative path in --config-file
Steps to reproduce:
(1) project structure:
/
my_lambda_project1
build_and_deploy
samconfig.toml
template.yaml
my_lambda_project2
...
(2) move to root directory (/)
(3) run sam build --base-dir "./my_lambda_project1" --config-file "./build_and_deploy/samconfig.toml"
Observed result:
2024-04-12 16:39:57,170 | Config file ./build_and_deploy/samconfig.toml does not exist or could not be
read!
Error: Config file ./build_and_deploy/samconfig.toml does not exist or could not be read!
Expected result:
sam starts building using the samconfig.toml file
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: Mac OS
- sam version: 1.115.0
- aws region: irrelevant for this use case.
sam --info:
{
"version": "1.115.0",
"system": {
"python": "3.12.2",
"os": "macOS-14.3.1-arm64-arm-64bit"
},
"additional_dependencies": {
"docker_engine": "20.10.16",
"aws_cdk": "2.61.1 (build d319d9c)",
"terraform": "Not available"
},
"available_beta_feature_env_vars": [
"SAM_CLI_BETA_FEATURES",
"SAM_CLI_BETA_BUILD_PERFORMANCE",
"SAM_CLI_BETA_TERRAFORM_SUPPORT",
"SAM_CLI_BETA_RUST_CARGO_LAMBDA"
]
}
Hi, thanks for bringing up the issue. Can you try running the build again with the command with it like this and let me know your result then? sam build --base-dir "./my_lambda_project1" --config-file "build_and_deploy/samconfig.toml".
Closing due to inactivity. If the issue persists, please open a new issue.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.