Hey all, when are `commandHooks` (<https://docs.se...
# help
r
Hey all, when are
commandHooks
(https://docs.serverless-stack.com/constructs/Function#commandhooks) supposed to be run? I have a simple api with a custom lambda like this
Copy code
const api = new sst.Api(this, 'Api', {
      routes: {
        'GET /': new Function(this, 'MyFunc', {
          handler: 'src/lambda.handler',
          bundle: {
            commandHooks: {
              beforeInstall() {
                console.log('before install')
                return [' echo beforeInstall']
              },
              beforeBundling(_, outDir) {
                console.log('before bundle', outDir)
                return [' echo beforeBundle']
              },
              afterBundling() {
                console.log('after bundle')
                return ['echo afterBundle']
              },
            },
          },
        }),
      },
    })
but I am not seeing those logs or echo's. How do ya get these things to run? Maybe this only runs on deploy...
t
yep only on deploy at the moment
f
@Ross Gerbasi do u need them to run on
sst start
?