Skip to content

Export: post-export hint path mismatch and ExportError conformance #187

@bguidolim

Description

@bguidolim

Problem

Two related issues in the export command output:

1. Post-export hint uses raw outputDir instead of resolved path

ExportCommand.swift line 415:

output.plain("  2. Test with: mcs pack add \(outputDir)")

Should use the resolved outputURL.path (which the write method uses) to ensure the suggested command works with relative paths.

2. ExportError uses CustomStringConvertible instead of LocalizedError

PackWriter.swift lines 86-101: ExportError conforms to Error + CustomStringConvertible but the project convention (MCSError, ManifestError) is LocalizedError with errorDescription. ArgumentParser uses localizedDescription for error display, which may fall back to a generic message without LocalizedError conformance.

Fix

  1. Change \(outputDir) to \(outputURL.path) in the hint
  2. Change CustomStringConvertible to LocalizedError and rename description to errorDescription

From PR #178 review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important prioritybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions