#I am trying to use the defaultpath

1 messages · Page 1 of 1 (latest)

spring shoal
#

I also tried to do this as a part of a class variable., but that did not work either, but I suspect that might be the proper way to do this

pliant tapir
#

I had to use a constructor to initialize a class variable. I couldn't set it in the declaration itself for some reason...

#
@object()
class AwsTsContainersDagger {
  env: string;

  constructor(env = "jeremy-dagger-demo/default/aws-ecs-demo") {
    this.env = env
  }
#

had tried

@object()
class AwsTsContainersDagger {
  env: string = "jeremy-dagger-demo/default/aws-ecs-demo";
spring shoal
#

That makes sense but this @argument defaultPath thing is some dagger special sauce I think

Not sure if we even support it here

pliant tapir
#

ah, right, the decorator

spring shoal
#

@weary socket do you know by chance if this is even supported?

pliant tapir
wet island
#

First thing that jumps out to me is that you don't have a type defined for that argument.

spring shoal
#

Thanks @wet island, you are my hero as usual. I thought I tried that already and ran into some other issue, but I don't remember what it was.

In either case this works!

  source: Directory 

  constructor(@argument({ defaultPath: "." }) source: Directory) {
    this.source = source
  }