Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/providers/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (p *NodeProvider) InstallNodeDeps(ctx *generate.GenerateContext, install *g

if ctx.App.HasMatch("node_modules") {
ctx.Logger.LogWarn("node_modules directory found in project root, this is likely a mistake")
ctx.Logger.LogWarn("It is recommended to add node_modules to the .gitignore file")
ctx.Logger.LogWarn("It is recommended to add node_modules to the .gitignore and/or .dockerignore file")
}

if p.usesCorepack() {
Expand Down
4 changes: 3 additions & 1 deletion core/providers/node/package_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ func (p PackageManager) installDependencies(ctx *generate.GenerateContext, works
// If there are any pre/post install scripts, we need the entire app to be copied
// This is to handle things like patch-package
if hasPreInstall || hasPostInstall || hasPrepare || usesLocalFile {
install.AddInput(ctx.NewLocalLayer())
layer := ctx.NewLocalLayer()
layer.Filter.Exclude = append(layer.Filter.Exclude, "node_modules")
install.AddInput(layer)

// Use all secrets for the install step if there are any pre/post install scripts
install.UseSecrets([]string{"*"})
Expand Down
9 changes: 8 additions & 1 deletion core/providers/python/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ func (p *PythonProvider) Plan(ctx *generate.GenerateContext) error {
install.Secrets = []string{}
install.UseSecretsWithPrefixes([]string{"PYTHON", "PIP", "PIPX", "UV", "PDM", "POETRY"})

if ctx.App.HasMatch(".venv") {
ctx.Logger.LogWarn(".venv directory found in project root, this is likely a mistake")
ctx.Logger.LogWarn("It is recommended to add .venv to the .gitignore and/or .dockerignore file")
}

build := ctx.NewCommandStep("build")
installOutputs := []string{}

Expand Down Expand Up @@ -368,7 +373,9 @@ func (p *PythonProvider) GetPythonEnvVars(ctx *generate.GenerateContext) map[str

func (p *PythonProvider) copyInstallFiles(ctx *generate.GenerateContext, install *generate.CommandStepBuilder) {
if p.installNeedsAllFiles(ctx) {
install.AddInput(ctx.NewLocalLayer())
layer := ctx.NewLocalLayer()
layer.Filter.Exclude = append(layer.Filter.Exclude, ".venv")
install.AddInput(layer)
return
}

Expand Down
Loading