Fixes #319.
This commit is contained in:
parent
4c99e3b6eb
commit
c4d294ca9b
1 changed files with 8 additions and 4 deletions
|
|
@ -1,14 +1,14 @@
|
||||||
# Copyright (C) Dominik Picheta. All rights reserved.
|
# Copyright (C) Dominik Picheta. All rights reserved.
|
||||||
# BSD License. Look at license.txt for more info.
|
# BSD License. Look at license.txt for more info.
|
||||||
import parsecfg, json, streams, strutils, parseutils, os, tables
|
import parsecfg, json, streams, strutils, parseutils, os, tables, future
|
||||||
|
from sequtils import apply, map
|
||||||
|
|
||||||
import version, tools, common, nimscriptsupport, options, packageinfo, cli
|
import version, tools, common, nimscriptsupport, options, packageinfo, cli
|
||||||
|
|
||||||
## Contains procedures for parsing .nimble files. Moved here from ``packageinfo``
|
## Contains procedures for parsing .nimble files. Moved here from ``packageinfo``
|
||||||
## because it depends on ``nimscriptsupport`` (``nimscriptsupport`` also
|
## because it depends on ``nimscriptsupport`` (``nimscriptsupport`` also
|
||||||
## depends on other procedures in ``packageinfo``.
|
## depends on other procedures in ``packageinfo``.
|
||||||
|
|
||||||
from sequtils import apply
|
|
||||||
|
|
||||||
type
|
type
|
||||||
NimbleFile* = string
|
NimbleFile* = string
|
||||||
|
|
||||||
|
|
@ -96,8 +96,12 @@ proc validatePackageStructure(pkgInfo: PackageInfo, options: Options) =
|
||||||
raiseNewValidationError(msg, true, hint, true)
|
raiseNewValidationError(msg, true, hint, true)
|
||||||
else:
|
else:
|
||||||
assert(not pkgInfo.isMinimal)
|
assert(not pkgInfo.isMinimal)
|
||||||
|
# On Windows `pkgInfo.bin` has a .exe extension, so we need to normalize.
|
||||||
|
let normalizedBinNames = pkgInfo.bin.map(
|
||||||
|
(x) => x.changeFileExt("").toLowerAscii()
|
||||||
|
)
|
||||||
let correctDir =
|
let correctDir =
|
||||||
if pkgInfo.name in pkgInfo.bin:
|
if pkgInfo.name.toLowerAscii() in normalizedBinNames:
|
||||||
pkgInfo.name & "pkg"
|
pkgInfo.name & "pkg"
|
||||||
else:
|
else:
|
||||||
pkgInfo.name
|
pkgInfo.name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue