made the default for --project argument the spec directory

This commit is contained in:
Yonas Kolb 2017-12-27 15:30:16 +08:00
parent ee75834c92
commit f5fa6a50c1
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ Given a very simple project spec file like this:
```yaml
name: My Project
options:
options:
bundleIdPrefix: com.myapp
targets:
MyApp:
@ -117,7 +117,7 @@ This will look for a project spec in the current directory called `project.yml`
Use `xcodegen --help` to see the list of options:
- **--spec**: An optional path to a `.yml` or `.json` project spec.
- **--project**: An optional path to a directory where the project will be generated. By default this is the current directory.
- **--project**: An optional path to a directory where the project will be generated. By default this is the directory the spec lives in.
- **--quiet**: Suppress informational and success messages. By default this is disabled.
## Editing

View File

@ -22,7 +22,7 @@ func generate(spec: String, project: String, isQuiet: Bool, justVersion: Bool) {
}
let specPath = Path(spec).absolute()
let projectPath = Path(project).normalize()
let projectPath = project == "" ? specPath.parent() : Path(project).absolute()
if !specPath.exists {
fatalError("No project spec found at \(specPath.absolute())")