Skip to content

Commit

Permalink
refactor: remove stale module name check
Browse files Browse the repository at this point in the history
  • Loading branch information
eysi09 committed Aug 23, 2018
1 parent d830ef3 commit 2f3a94f
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions garden-cli/src/config/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
getNames,
} from "../util/util"
import { baseModuleSpecSchema, ModuleConfig } from "./module"
import { joiIdentifier, validate } from "./common"
import { validate } from "./common"
import { ConfigurationError } from "../exceptions"
import * as Joi from "joi"
import * as yaml from "js-yaml"
Expand Down Expand Up @@ -124,18 +124,6 @@ export async function loadConfig(projectRoot: string, path: string): Promise<Gar
type: moduleConfig.type,
variables: moduleConfig.variables,
}

if (!moduleConfig.name) {
try {
moduleConfig.name = validate(dirname, joiIdentifier())
} catch (_) {
throw new ConfigurationError(
`Directory name ${parsed.dirname} is not a valid module name (must be valid identifier). ` +
`Please rename the directory or specify a module name in the garden.yml file.`,
{ dirname: parsed.dirname },
)
}
}
}

return {
Expand Down

0 comments on commit 2f3a94f

Please sign in to comment.