After 'sls deploy', 'sls deploy function' errors with "Uploaded file must be a non-empty zip"

The initial ‘sls deploy’ works fine, but I get this error on trying to deploy the individual function with ‘sls deploy function --function test’

Serverless Error ---------------------------------------
  Uploaded file must be a non-empty zip
Your Environment Infomation -----------------------------
  OS:                 darwin
  Node Version:       4.6.0
  Serverless Version: 1.0.3

The handler.js is in the ‘test’ subfolder and this is the yaml:

    name: ${self:provider.stage}-test
    handler: test/handler.test
    memorySize: 128
      - http:
          path: test
          method: get

The function works on AWS and locally with serverless-offline. But I can’t update it without doing another ‘sls deploy’ (which takes 5+ minutes). Any help would be appreciated.

Edit: I downloaded Serverless Dashboard and the deploy function worked. The working command from the App doesn’t work from the command line.