fix(sqlx-cli): fix the build (#1969)

This fixes:

```
error[E0616]: field `target_directory` of struct `metadata::Metadata` is private
   --> sqlx-cli/src/prepare.rs:175:47
    |
175 |             .env("CARGO_TARGET_DIR", metadata.target_directory.clone())
    |                                               ^^^^^^^^^^^^^^^^ private field
    |
help: a method `target_directory` also exists, call it with parentheses
    |
175 |             .env("CARGO_TARGET_DIR", metadata.target_directory().clone())
    |                                                               ++
```
This commit is contained in:
Ivan Kozik 2022-07-14 07:09:53 +00:00 committed by GitHub
parent d6c4eff81a
commit b9a8f90b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,7 +172,7 @@ hint: This command only works in the manifest directory of a Cargo package."#
))
.env("SQLX_OFFLINE", "false")
.env("DATABASE_URL", url)
.env("CARGO_TARGET_DIR", metadata.target_directory.clone())
.env("CARGO_TARGET_DIR", metadata.target_directory().clone())
.status()?
};