Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit 8a5c7ea

Browse files
authored
fix openapi location check (#3)
1 parent b9b5474 commit 8a5c7ea

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Plugins/Shared/scripts/CheckOpenApiSecurityScript.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ struct CheckOpenApiSecurityScript: ScriptProtocol {
1717
\(ScriptEnum.directories.rawValue)
1818
1919
OPENAPI_YAML_LOCATION="${REPO_ROOT}/openapi";
20-
2120
# Check if the OpenAPI directory exists
22-
if ! test -f ${OPENAPI_YAML_LOCATION}; then
21+
if ! [ -d ${OPENAPI_YAML_LOCATION} ]; then
2322
log "❗Openapi location not found."
2423
exit 0
2524
fi

Plugins/Shared/scripts/CheckOpenApiValidationScript.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ struct CheckOpenApiValidationScript: ScriptProtocol {
1717
\(ScriptEnum.directories.rawValue)
1818
1919
OPENAPI_YAML_LOCATION="${REPO_ROOT}/openapi";
20-
2120
# Check if the OpenAPI directory exists
22-
if ! test -f ${OPENAPI_YAML_LOCATION}; then
21+
if ! [ -d ${OPENAPI_YAML_LOCATION} ]; then
2322
log "❗Openapi location not found."
2423
exit 0
2524
fi

Plugins/Shared/scripts/RunOpenApiServerScript.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ struct RunOpenApiServerScript: ScriptProtocol {
1717
\(ScriptEnum.directories.rawValue)
1818
1919
OPENAPI_YAML_LOCATION="${REPO_ROOT}/openapi";
20-
2120
# Check if the OpenAPI directory exists
22-
if ! test -f ${OPENAPI_YAML_LOCATION}; then
21+
if ! [ -d ${OPENAPI_YAML_LOCATION} ]; then
2322
log "❗Openapi location not found."
2423
exit 0
2524
fi

0 commit comments

Comments
 (0)