-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Describe the bug
project-location is documented as: "The location of the project, if not set the current directory will be assumed."
It actually is relative to, and defaults to, the folder of your template file rather than your current working directory.
Expected Behavior
project location is relative to, and defaults to, the current working directory
Current Behavior
project location actually is relative to, and defaults to, the folder of your template file.
Reproduction Steps
Commands assume you're using git-bash on Windows 10:
- in an empty folder, run
dotnet new lambda.EmptyFunction && touch serverless.yaml - copy the template below into the serverless.yaml file you've just created
cd src/lambda-example- run
dotnet lambda package-ci -t ../../serverless.yaml -sb "${bucket}" --output-template compiled.yamlusing a bucket in your default region to which you have write-access - see the bug - it'll zip everything in your current folder without building anything
cp ../../serverless.yaml . && cd ../.. && dotnet lambda package-ci -t src/lambda-example/serverless.yaml -sb "${bucket}" --output-template compiled.yaml- see the bug - failure should be expected, but it works
serverless.yaml:
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
LambdaAuthorizer:
Type: AWS::Lambda::Function
Properties:
Runtime: dotnet6
Handler: lambda-example::lambda_example.Function::FunctionHandler
Possible Solution
Update the documentation - this would be a breaking change, and probably not worth actually changing the behavior.
Additional Information/Context
No response
Targeted .NET platform
$ dotnet --version
6.0.202
CLI extension version
$ dotnet tool list -g
Package Id Version Commands
amazon.lambda.testtool-3.1 0.12.1 dotnet-lambda-test-tool-3.1
amazon.lambda.testtool-6.0 0.12.1 dotnet-lambda-test-tool-6.0
amazon.lambda.tools 5.1.4 dotnet-lambda
dotnet-ef 5.0.9 dotnet-ef
dotnet-reportgenerator-globaltool 4.8.12 reportgenerator
Environment details (OS name and version, etc.)
Windows 10, git bash